test_2501.cpp 446 B

12345678910111213141516
  1. // Copyright (C) 2010 Vicente Botet
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #include <boost/thread/shared_mutex.hpp>
  6. #include <boost/thread/locks.hpp>
  7. int main() {
  8. boost::shared_mutex mtx; boost::upgrade_lock<boost::shared_mutex> lk(mtx);
  9. boost::upgrade_to_unique_lock<boost::shared_mutex> lk2(lk);
  10. return 0;
  11. }