]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mp11/test/mp_pop_front.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / mp11 / test / mp_pop_front.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/core/lightweight_test_trait.hpp>
11 #include <boost/mp11/list.hpp>
12 #include <type_traits>
13 #include <tuple>
14 #include <utility>
15
16 int main()
17 {
18 using boost::mp11::mp_list;
19 using boost::mp11::mp_pop_front;
20 using boost::mp11::mp_rest;
21
22 using L1 = mp_list<void>;
23 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_pop_front<L1>, mp_list<>>));
24 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_rest<L1>, mp_list<>>));
25
26 using L2 = mp_list<int[], void(), float>;
27 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_pop_front<L2>, mp_list<void(), float>>));
28 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_rest<L2>, mp_list<void(), float>>));
29
30 using L3 = std::tuple<int>;
31 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_pop_front<L3>, std::tuple<>>));
32 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_rest<L3>, std::tuple<>>));
33
34 using L4 = std::tuple<char, double>;
35 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_pop_front<L4>, std::tuple<double>>));
36 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_rest<L4>, std::tuple<double>>));
37
38 return boost::report_errors();
39 }