]>
Commit | Line | Data |
---|---|---|
92f5a8d4 TL |
1 | /* |
2 | Copyright 2019 Glen Joseph Fernandes | |
3 | (glenjofe@gmail.com) | |
4 | ||
5 | Distributed under the Boost Software License, | |
6 | Version 1.0. (See accompanying file LICENSE_1_0.txt | |
7 | or copy at http://www.boost.org/LICENSE_1_0.txt) | |
8 | */ | |
9 | ||
10 | #ifdef TEST_STD | |
11 | #include <type_traits> | |
12 | #else | |
13 | #include <boost/type_traits/copy_reference.hpp> | |
14 | #endif | |
15 | #include "test.hpp" | |
16 | #include "check_type.hpp" | |
17 | ||
18 | TT_TEST_BEGIN(copy_reference) | |
19 | ||
20 | BOOST_CHECK_TYPE3(::tt::copy_reference<int, char>::type, int); | |
21 | BOOST_CHECK_TYPE3(::tt::copy_reference<int, char&>::type, int&); | |
22 | BOOST_CHECK_TYPE3(::tt::copy_reference<int&, char>::type, int&); | |
23 | BOOST_CHECK_TYPE3(::tt::copy_reference<int&, char&>::type, int&); | |
24 | ||
25 | #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) | |
26 | BOOST_CHECK_TYPE3(::tt::copy_reference<int, char&&>::type, int&&); | |
27 | BOOST_CHECK_TYPE3(::tt::copy_reference<int&, char&&>::type, int&); | |
28 | BOOST_CHECK_TYPE3(::tt::copy_reference<int&&, char>::type, int&&); | |
29 | BOOST_CHECK_TYPE3(::tt::copy_reference<int&&, char&>::type, int&); | |
30 | BOOST_CHECK_TYPE3(::tt::copy_reference<int&&, char&&>::type, int&&); | |
31 | #endif | |
32 | ||
33 | TT_TEST_END |