]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/tricky_rvalue_test.cpp
85d4d9e4a0f85f2ea4cde788cad89392480678fc
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)
8 #include "check_integral_constant.hpp"
10 # include <type_traits>
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>
19 TT_TEST_BEGIN(rvalue_reference_test
)
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);