]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/test/ext/boost/mpl/vector/tag.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / ext / boost / mpl / vector / tag.cpp
CommitLineData
b32b8144 1// Copyright Louis Dionne 2013-2017
7c673cae
FG
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>
15namespace hana = boost::hana;
16namespace mpl = boost::mpl;
17
18
19struct t1; struct t2; struct t3; struct t4;
20
21using mpl_id = mpl::quote1<mpl::identity>;
22
23static_assert(std::is_same<
24 hana::tag_of_t<mpl::vector<>>,
25 hana::ext::boost::mpl::vector_tag
26>{}, "");
27static_assert(std::is_same<
28 hana::tag_of_t<mpl::vector<>::type>,
29 hana::ext::boost::mpl::vector_tag
30>{}, "");
31static_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
36static_assert(std::is_same<
37 hana::tag_of_t<mpl::vector<t1>>,
38 hana::ext::boost::mpl::vector_tag
39>{}, "");
40static_assert(std::is_same<
41 hana::tag_of_t<mpl::vector<t1>::type>,
42 hana::ext::boost::mpl::vector_tag
43>{}, "");
44static_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
49static_assert(std::is_same<
50 hana::tag_of_t<mpl::vector<t1, t2>>,
51 hana::ext::boost::mpl::vector_tag
52>{}, "");
53static_assert(std::is_same<
54 hana::tag_of_t<mpl::vector<t1, t2>::type>,
55 hana::ext::boost::mpl::vector_tag
56>{}, "");
57static_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
62int main() { }