]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/test/detail/type_at.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / detail / type_at.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/detail/type_at.hpp>
6
7#include <type_traits>
8namespace hana = boost::hana;
9
10
11template <int>
12struct x;
13
14static_assert(std::is_same<
15 hana::detail::type_at<0, x<0>>::type,
16 x<0>
17>{}, "");
18static_assert(std::is_same<
19 hana::detail::type_at<0, x<0>, x<1>>::type,
20 x<0>
21>{}, "");
22static_assert(std::is_same<
23 hana::detail::type_at<0, x<0>, x<1>, x<2>>::type,
24 x<0>
25>{}, "");
26
27static_assert(std::is_same<
28 hana::detail::type_at<1, x<0>, x<1>>::type,
29 x<1>
30>{}, "");
31static_assert(std::is_same<
32 hana::detail::type_at<1, x<0>, x<1>, x<2>>::type,
33 x<1>
34>{}, "");
35static_assert(std::is_same<
36 hana::detail::type_at<1, x<0>, x<1>, x<2>, x<3>>::type,
37 x<1>
38>{}, "");
39
40static_assert(std::is_same<
41 hana::detail::type_at<2, x<0>, x<1>, x<2>>::type,
42 x<2>
43>{}, "");
44static_assert(std::is_same<
45 hana::detail::type_at<2, x<0>, x<1>, x<2>, x<3>>::type,
46 x<2>
47>{}, "");
48static_assert(std::is_same<
49 hana::detail::type_at<2, x<0>, x<1>, x<2>, x<3>, x<4>>::type,
50 x<2>
51>{}, "");
52
53static_assert(std::is_same<
54 hana::detail::type_at<3, x<0>, x<1>, x<2>, x<3>>::type,
55 x<3>
56>{}, "");
57static_assert(std::is_same<
58 hana::detail::type_at<3, x<0>, x<1>, x<2>, x<3>, x<4>>::type,
59 x<3>
60>{}, "");
61static_assert(std::is_same<
62 hana::detail::type_at<3, x<0>, x<1>, x<2>, x<3>, x<4>, x<5>>::type,
63 x<3>
64>{}, "");
65
66static_assert(std::is_same<
67 hana::detail::type_at<4, x<0>, x<1>, x<2>, x<3>, x<4>>::type,
68 x<4>
69>{}, "");
70static_assert(std::is_same<
71 hana::detail::type_at<4, x<0>, x<1>, x<2>, x<3>, x<4>, x<5>>::type,
72 x<4>
73>{}, "");
74static_assert(std::is_same<
75 hana::detail::type_at<4, x<0>, x<1>, x<2>, x<3>, x<4>, x<5>, x<6>>::type,
76 x<4>
77>{}, "");
78
79static_assert(std::is_same<
80 hana::detail::type_at<5, x<0>, x<1>, x<2>, x<3>, x<4>, x<5>>::type,
81 x<5>
82>{}, "");
83static_assert(std::is_same<
84 hana::detail::type_at<5, x<0>, x<1>, x<2>, x<3>, x<4>, x<5>, x<6>>::type,
85 x<5>
86>{}, "");
87static_assert(std::is_same<
88 hana::detail::type_at<5, x<0>, x<1>, x<2>, x<3>, x<4>, x<5>, x<6>, x<7>>::type,
89 x<5>
90>{}, "");
91
92static_assert(std::is_same<
93 hana::detail::type_at<6, x<0>, x<1>, x<2>, x<3>, x<4>, x<5>, x<6>>::type,
94 x<6>
95>{}, "");
96
97static_assert(std::is_same<
98 hana::detail::type_at<7, x<0>, x<1>, x<2>, x<3>, x<4>, x<5>, x<6>, x<7>>::type,
99 x<7>
100>{}, "");
101
102int main() { }