]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mp11/test/mp_identity.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / mp11 / test / mp_identity.cpp
1
2 // Copyright 2015 Peter Dimov.
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 //
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8
9
10 #include <boost/mp11/utility.hpp>
11 #include <boost/core/lightweight_test_trait.hpp>
12 #include <type_traits>
13
14 struct X {};
15
16 int main()
17 {
18 using boost::mp11::mp_identity;
19
20 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<void const volatile>::type, void const volatile>));
21 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<void()>::type, void()>));
22 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<int const[]>::type, int const[]>));
23 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<X>::type, X>));
24
25 using boost::mp11::mp_identity_t;
26
27 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity_t<void const volatile>, void const volatile>));
28 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity_t<void()>, void()>));
29 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity_t<int const[]>, int const[]>));
30 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity_t<X>, X>));
31
32 return boost::report_errors();
33 }