]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/ext/boost/mpl/vector/tag.cpp
eb1c4528c43fed1325b729d391be0ff8b5aeb231
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)
5 #include <boost/hana/ext/boost/mpl/vector.hpp>
7 #include <boost/hana/core/tag_of.hpp>
9 #include <boost/mpl/identity.hpp>
10 #include <boost/mpl/vector.hpp>
11 #include <boost/mpl/quote.hpp>
12 #include <boost/mpl/transform.hpp>
14 #include <type_traits>
15 namespace hana
= boost::hana
;
16 namespace mpl
= boost::mpl
;
19 struct t1
; struct t2
; struct t3
; struct t4
;
21 using mpl_id
= mpl::quote1
<mpl::identity
>;
23 static_assert(std::is_same
<
24 hana::tag_of_t
<mpl::vector
<>>,
25 hana::ext::boost::mpl::vector_tag
27 static_assert(std::is_same
<
28 hana::tag_of_t
<mpl::vector
<>::type
>,
29 hana::ext::boost::mpl::vector_tag
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
36 static_assert(std::is_same
<
37 hana::tag_of_t
<mpl::vector
<t1
>>,
38 hana::ext::boost::mpl::vector_tag
40 static_assert(std::is_same
<
41 hana::tag_of_t
<mpl::vector
<t1
>::type
>,
42 hana::ext::boost::mpl::vector_tag
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
49 static_assert(std::is_same
<
50 hana::tag_of_t
<mpl::vector
<t1
, t2
>>,
51 hana::ext::boost::mpl::vector_tag
53 static_assert(std::is_same
<
54 hana::tag_of_t
<mpl::vector
<t1
, t2
>::type
>,
55 hana::ext::boost::mpl::vector_tag
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