types_pass.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // Copyright (C) 2011 Vicente J. Botet Escriba
  10. //
  11. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  12. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  13. // <boost/thread/mutex.hpp>
  14. // <mutex>
  15. // template <class Mutex>
  16. // class upgrade_lock
  17. // {
  18. // public:
  19. // typedef Mutex mutex_type;
  20. // ...
  21. // };
  22. #include <boost/thread/lock_types.hpp>
  23. #include <boost/thread/shared_mutex.hpp>
  24. #include <boost/static_assert.hpp>
  25. #include <boost/detail/lightweight_test.hpp>
  26. int main()
  27. {
  28. BOOST_STATIC_ASSERT_MSG((boost::is_same<boost::upgrade_lock<boost::upgrade_mutex>::mutex_type,
  29. boost::upgrade_mutex>::value), "");
  30. return boost::report_errors();
  31. }