]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/test/is_same_test.cpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / type_traits / test / is_same_test.cpp
CommitLineData
7c673cae
FG
1
2// (C) Copyright John Maddock 2000.
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
7c673cae
FG
7#ifdef TEST_STD
8# include <type_traits>
9#else
10# include <boost/type_traits/is_same.hpp>
11#endif
11fdf7f2
TL
12#include "test.hpp"
13#include "check_integral_constant.hpp"
7c673cae
FG
14
15TT_TEST_BEGIN(is_same)
16
17BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, int>::value), true);
18BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int&, int&>::value), true);
19#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
20BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int&&, int&&>::value), true);
21#endif
22BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, const int>::value), false);
23BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, int&>::value), false);
24#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
25BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, int&&>::value), false);
26#endif
27BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<const int, int&>::value), false);
28BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, const int&>::value), false);
29BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int*, const int*>::value), false);
30BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int*, int*const>::value), false);
31BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, int[2]>::value), false);
32BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int*, int[2]>::value), false);
33BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int[4], int[2]>::value), false);
34
35TT_TEST_END
36
37
38
39
40
41
42
43