| 437 | #endif |
| 438 | |
| 439 | void unlock() |
| 440 | { |
| 441 | if (m == 0) |
| 442 | { |
| 443 | boost::throw_exception( |
| 444 | boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex")); |
| 445 | } |
| 446 | if (!owns_lock()) |
| 447 | { |
| 448 | boost::throw_exception( |
| 449 | boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock doesn't own the mutex")); |
| 450 | } |
| 451 | m->unlock(); |
| 452 | is_locked = false; |
| 453 | } |
| 454 | |
| 455 | #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) |
| 456 | typedef void (unique_lock::*bool_type)(); |
no test coverage detected