]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/test/ext/std/integral_constant/tag.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / ext / std / integral_constant / 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/std/integral_constant.hpp>
6
7#include <boost/hana/core/tag_of.hpp>
8
9#include <type_traits>
10namespace hana = boost::hana;
11
12
13struct inherit_simple : std::integral_constant<int, 3> { };
14struct inherit_no_default : std::integral_constant<int, 3> {
15 inherit_no_default() = delete;
16};
17
18struct incomplete;
19struct empty_type { };
20struct non_pod { virtual ~non_pod() { } };
21
22
23static_assert(std::is_same<
24 hana::tag_of_t<inherit_simple>,
25 hana::ext::std::integral_constant_tag<int>
26>{}, "");
27static_assert(std::is_same<
28 hana::tag_of_t<inherit_no_default>,
29 hana::ext::std::integral_constant_tag<int>
30>{}, "");
31static_assert(std::is_same<
32 hana::tag_of_t<std::is_pointer<int*>>,
33 hana::ext::std::integral_constant_tag<bool>
34>{}, "");
35
36static_assert(!std::is_same<
37 hana::tag_of_t<incomplete>,
38 hana::ext::std::integral_constant_tag<int>
39>{}, "");
40static_assert(!std::is_same<
41 hana::tag_of_t<empty_type>,
42 hana::ext::std::integral_constant_tag<int>
43>{}, "");
44static_assert(!std::is_same<
45 hana::tag_of_t<non_pod>,
46 hana::ext::std::integral_constant_tag<int>
47>{}, "");
48static_assert(!std::is_same<
49 hana::tag_of_t<void>,
50 hana::ext::std::integral_constant_tag<int>
51>{}, "");
52
53int main() { }