]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/ext/boost/mpl/vector/tag.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / hana / test / ext / boost / mpl / vector / tag.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/ext/boost/mpl/vector.hpp>
6
7 #include <boost/hana/core/tag_of.hpp>
8
9 #include <boost/mpl/identity.hpp>
10 #include <boost/mpl/vector.hpp>
11 #include <boost/mpl/quote.hpp>
12 #include <boost/mpl/transform.hpp>
13
14 #include <type_traits>
15 namespace hana = boost::hana;
16 namespace mpl = boost::mpl;
17
18
19 struct t1; struct t2; struct t3; struct t4;
20
21 using mpl_id = mpl::quote1<mpl::identity>;
22
23 static_assert(std::is_same<
24 hana::tag_of_t<mpl::vector<>>,
25 hana::ext::boost::mpl::vector_tag
26 >{}, "");
27 static_assert(std::is_same<
28 hana::tag_of_t<mpl::vector<>::type>,
29 hana::ext::boost::mpl::vector_tag
30 >{}, "");
31 static_assert(std::is_same<
32 hana::tag_of_t<mpl::transform<mpl::vector<>, mpl_id>::type>,
33 hana::ext::boost::mpl::vector_tag
34 >{}, "");
35
36 static_assert(std::is_same<
37 hana::tag_of_t<mpl::vector<t1>>,
38 hana::ext::boost::mpl::vector_tag
39 >{}, "");
40 static_assert(std::is_same<
41 hana::tag_of_t<mpl::vector<t1>::type>,
42 hana::ext::boost::mpl::vector_tag
43 >{}, "");
44 static_assert(std::is_same<
45 hana::tag_of_t<mpl::transform<mpl::vector<t1>, mpl_id>::type>,
46 hana::ext::boost::mpl::vector_tag
47 >{}, "");
48
49 static_assert(std::is_same<
50 hana::tag_of_t<mpl::vector<t1, t2>>,
51 hana::ext::boost::mpl::vector_tag
52 >{}, "");
53 static_assert(std::is_same<
54 hana::tag_of_t<mpl::vector<t1, t2>::type>,
55 hana::ext::boost::mpl::vector_tag
56 >{}, "");
57 static_assert(std::is_same<
58 hana::tag_of_t<mpl::transform<mpl::vector<t1, t2>, mpl_id>::type>,
59 hana::ext::boost::mpl::vector_tag
60 >{}, "");
61
62 int main() { }