copy_assign_fail.cpp 672 B

12345678910111213141516171819202122232425262728
  1. // Copyright (C) 2011 Vicente J. Botet Escriba
  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. // <boost/thread/locks.hpp>
  6. // template <class Mutex> class strict_lock;
  7. // strict_lock& operator=(strict_lock const&) = delete;
  8. #include <boost/thread/strict_lock.hpp>
  9. #include <boost/thread/mutex.hpp>
  10. #include <boost/detail/lightweight_test.hpp>
  11. boost::mutex m0;
  12. boost::mutex m1;
  13. int main()
  14. {
  15. boost::strict_lock<boost::mutex> lk0(m0);
  16. boost::strict_lock<boost::mutex> lk1(m1);
  17. lk1 = lk0;
  18. }
  19. #include "../../../../remove_error_code_unused_warning.hpp"