![]() |
Home | Libraries | People | FAQ | More |
Locks provide an explicit bool conversion operator when the compiler provides them.
explicit operator bool() const;
The library provides un implicit conversion to an undefined type that can be used as a conditional expression.
#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) operator unspecified-bool-type() const; bool operator!() const; #else explicit operator bool() const; #endif
The user should use the lock.owns_lock() when an explicit conversion is required.
If owns_lock()
would return true, a
value that evaluates to true
in boolean contexts, otherwise a value that evaluates to false in boolean contexts.
Nothing.
! owns_lock().
Nothing.