Reputation: 21897
The following code compiles
scoped_lock<named_mutex> lock(some_mutex);
if (!lock) { // What does this means, which function is called
}
Since lock is an object what happens inthe if (!lock). Does any overloaded function gets called.
Upvotes: 1
Views: 64
Reputation: 2183
operator unspecified_bool_type() const;
, which returns owns()
, will be called
http://live.boost.org/doc/libs/release/doc/html/boost/interprocess/scoped_lock.html
Upvotes: 2