/Src/Dependencies/Boost/libs/unordered/test/helpers/check_return_type.hpp

http://hadesmem.googlecode.com/ · C++ Header · 38 lines · 28 code · 7 blank · 3 comment · 0 complexity · 3bd0ae01509b6a42b8f3c463a2cf24e8 MD5 · raw file

  1. // Copyright 2005-2009 Daniel James.
  2. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #if !defined(BOOST_UNORDERED_TEST_HELPERS_CHECK_RETURN_TYPE_HEADER)
  5. #define BOOST_UNORDERED_TEST_HELPERS_CHECK_RETURN_TYPE_HEADER
  6. #include <boost/mpl/assert.hpp>
  7. #include <boost/type_traits/is_same.hpp>
  8. #include <boost/type_traits/is_convertible.hpp>
  9. namespace test
  10. {
  11. template <class T1>
  12. struct check_return_type
  13. {
  14. template <class T2>
  15. static void equals(T2)
  16. {
  17. BOOST_MPL_ASSERT((boost::is_same<T1, T2>));
  18. }
  19. template <class T2>
  20. static void equals_ref(T2&)
  21. {
  22. BOOST_MPL_ASSERT((boost::is_same<T1, T2>));
  23. }
  24. template <class T2>
  25. static void convertible(T2)
  26. {
  27. BOOST_MPL_ASSERT((boost::is_convertible<T2, T1>));
  28. }
  29. };
  30. }
  31. #endif