types_pass.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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) 2012 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 lock_guard
  17. // {
  18. // public:
  19. // typedef Mutex mutex_type;
  20. // ...
  21. // };
  22. #include <boost/thread/lock_guard.hpp>
  23. #include <boost/thread/mutex.hpp>
  24. #include <boost/static_assert.hpp>
  25. #include <boost/type_traits/is_same.hpp>
  26. #include <boost/detail/lightweight_test.hpp>
  27. int main()
  28. {
  29. BOOST_STATIC_ASSERT_MSG((boost::is_same<boost::lock_guard<boost::mutex>::mutex_type,
  30. boost::mutex>::value), "");
  31. return boost::report_errors();
  32. }