types_pass.cpp 827 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (C) 2012 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/mutex.hpp>
  6. // <mutex>
  7. // template <class Mutex>
  8. // class unlock_guard
  9. // {
  10. // public:
  11. // typedef Mutex mutex_type;
  12. // ...
  13. // };
  14. #include <boost/thread/mutex.hpp>
  15. #include <boost/thread/reverse_lock.hpp>
  16. #include <boost/thread/lock_types.hpp>
  17. #include <boost/thread/mutex.hpp>
  18. #include <boost/static_assert.hpp>
  19. #include <boost/type_traits/is_same.hpp>
  20. #include <boost/detail/lightweight_test.hpp>
  21. int main()
  22. {
  23. BOOST_STATIC_ASSERT_MSG((boost::is_same<boost::reverse_lock<boost::unique_lock<boost::mutex> >::mutex_type,
  24. boost::mutex>::value), "");
  25. return boost::report_errors();
  26. }