]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/test/type/make.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / type / make.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/assert.hpp>
6#include <boost/hana/equal.hpp>
7#include <boost/hana/type.hpp>
8namespace hana = boost::hana;
9
10
11struct T { };
12
13int main() {
14 BOOST_HANA_CONSTANT_CHECK(hana::equal(
15 hana::make<hana::type_tag>(T{}),
16 hana::decltype_(T{})
17 ));
18
19 BOOST_HANA_CONSTANT_CHECK(hana::equal(
20 hana::make<hana::type_tag>(hana::type_c<T>),
21 hana::decltype_(hana::type_c<T>)
22 ));
23
24 BOOST_HANA_CONSTANT_CHECK(hana::equal(
25 hana::make_type(T{}),
26 hana::make<hana::type_tag>(T{})
27 ));
28
29 BOOST_HANA_CONSTANT_CHECK(hana::equal(
30 hana::make_type(hana::type_c<T>),
31 hana::make<hana::type_tag>(hana::type_c<T>)
32 ));
33
34 // make sure we don't read from non-constexpr variables
35 {
36 auto t = hana::type_c<T>;
37 auto x = 1;
38 constexpr auto r1 = hana::make<hana::type_tag>(t); (void)r1;
39 constexpr auto r2 = hana::make<hana::type_tag>(x); (void)r2;
40 }
41}