]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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" | |
b32b8144 | 9 | #include <boost/detail/workaround.hpp> |
7c673cae FG |
10 | #ifdef TEST_STD |
11 | # include <type_traits> | |
12 | #else | |
13 | # include <boost/type_traits/is_convertible.hpp> | |
14 | # include <boost/type_traits/is_lvalue_reference.hpp> | |
15 | # include <boost/type_traits/is_rvalue_reference.hpp> | |
16 | # include <boost/type_traits/is_reference.hpp> | |
17 | # include <boost/type_traits/is_function.hpp> | |
18 | #endif | |
19 | ||
20 | TT_TEST_BEGIN(rvalue_reference_test) | |
21 | ||
b32b8144 FG |
22 | #if !(defined(CI_SUPPRESS_KNOWN_ISSUES) && BOOST_WORKAROUND(BOOST_MSVC, <= 1700)) |
23 | ||
7c673cae FG |
24 | #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES |
25 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int (&&)(int)>::value, true); | |
26 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int (&)(int)>::value, false); | |
27 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int (&&)(int)>::value, true); | |
28 | BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int&&, int&>::value), false); | |
29 | BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int(&&)()>::value), true); | |
30 | #endif | |
31 | ||
b32b8144 FG |
32 | #endif |
33 | ||
7c673cae FG |
34 | TT_TEST_END |
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 |