]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/unordered/test/helpers/check_return_type.hpp
b73f9869ea5b06ccec2e98e8778c557e2db8aa17
[ceph.git] / ceph / src / boost / libs / unordered / test / helpers / check_return_type.hpp
1
2 // Copyright 2005-2009 Daniel James.
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
6 #if !defined(BOOST_UNORDERED_TEST_HELPERS_CHECK_RETURN_TYPE_HEADER)
7 #define BOOST_UNORDERED_TEST_HELPERS_CHECK_RETURN_TYPE_HEADER
8
9 #include <boost/static_assert.hpp>
10 #include <boost/type_traits/is_same.hpp>
11 #include <boost/type_traits/is_convertible.hpp>
12
13 namespace test
14 {
15 template <class T1>
16 struct check_return_type
17 {
18 template <class T2>
19 static void equals(T2)
20 {
21 BOOST_STATIC_ASSERT((boost::is_same<T1, T2>::value));
22 }
23
24 template <class T2>
25 static void equals_ref(T2&)
26 {
27 BOOST_STATIC_ASSERT((boost::is_same<T1, T2>::value));
28 }
29
30 template <class T2>
31 static void convertible(T2)
32 {
33 BOOST_STATIC_ASSERT((boost::is_convertible<T2, T1>::value));
34 }
35 };
36 }
37
38 #endif