]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/tuple/special.drop_front_exactly.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / hana / test / tuple / special.drop_front_exactly.cpp
1 // Copyright Louis Dionne 2013-2016
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
4
5 #include <boost/hana/assert.hpp>
6 #include <boost/hana/drop_front_exactly.hpp>
7 #include <boost/hana/equal.hpp>
8 #include <boost/hana/tuple.hpp>
9 namespace hana = boost::hana;
10
11
12 struct x0;
13 struct x1;
14 struct x2;
15
16 int main() {
17 // tuple_t
18 BOOST_HANA_CONSTANT_CHECK(hana::equal(
19 hana::drop_front_exactly(hana::tuple_t<x0>),
20 hana::tuple_t<>
21 ));
22 BOOST_HANA_CONSTANT_CHECK(hana::equal(
23 hana::drop_front_exactly(hana::tuple_t<x0, x1>),
24 hana::tuple_t<x1>
25 ));
26 BOOST_HANA_CONSTANT_CHECK(hana::equal(
27 hana::drop_front_exactly(hana::tuple_t<x0, x1, x2>),
28 hana::tuple_t<x1, x2>
29 ));
30
31 // tuple_c
32 BOOST_HANA_CONSTANT_CHECK(hana::equal(
33 hana::drop_front_exactly(hana::tuple_c<int, 0>),
34 hana::tuple_c<int>
35 ));
36
37 BOOST_HANA_CONSTANT_CHECK(hana::equal(
38 hana::drop_front_exactly(hana::tuple_c<int, 0, 1>),
39 hana::tuple_c<int, 1>
40 ));
41
42 BOOST_HANA_CONSTANT_CHECK(hana::equal(
43 hana::drop_front_exactly(hana::tuple_c<int, 0, 1, 2>),
44 hana::tuple_c<int, 1, 2>
45 ));
46 }