]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/tricky_rvalue_test.cpp
85d4d9e4a0f85f2ea4cde788cad89392480678fc
[ceph.git] / ceph / src / boost / libs / type_traits / test / tricky_rvalue_test.cpp
1
2 // (C) Copyright John Maddock 2010.
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7 #include "test.hpp"
8 #include "check_integral_constant.hpp"
9 #ifdef TEST_STD
10 # include <type_traits>
11 #else
12 # include <boost/type_traits/is_convertible.hpp>
13 # include <boost/type_traits/is_lvalue_reference.hpp>
14 # include <boost/type_traits/is_rvalue_reference.hpp>
15 # include <boost/type_traits/is_reference.hpp>
16 # include <boost/type_traits/is_function.hpp>
17 #endif
18
19 TT_TEST_BEGIN(rvalue_reference_test)
20
21 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
22 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int (&&)(int)>::value, true);
23 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int (&)(int)>::value, false);
24 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int (&&)(int)>::value, true);
25 BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int&&, int&>::value), false);
26 BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int(&&)()>::value), true);
27 #endif
28
29 TT_TEST_END
30
31
32
33
34
35
36
37