]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/test/ext/std/integer_sequence/equal.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / ext / std / integer_sequence / equal.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/ext/std/integer_sequence.hpp>
8#include <boost/hana/not.hpp>
9
10#include <utility>
11namespace hana = boost::hana;
12
13
14using T = int;
15using U = long long;
16
17int main() {
18 BOOST_HANA_CONSTANT_CHECK(hana::equal(
19 std::integer_sequence<T>{},
20 std::integer_sequence<U>{}
21 ));
22 BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal(
23 std::integer_sequence<T, 0>{},
24 std::integer_sequence<U>{}
25 )));
26 BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal(
27 std::integer_sequence<T>{},
28 std::integer_sequence<U, 0>{}
29 )));
30
31 BOOST_HANA_CONSTANT_CHECK(hana::equal(
32 std::integer_sequence<T, 0>{},
33 std::integer_sequence<U, 0>{}
34 ));
35 BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal(
36 std::integer_sequence<T, 0>{},
37 std::integer_sequence<U, 0, 1>{}
38 )));
39 BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal(
40 std::integer_sequence<T, 0, 2>{},
41 std::integer_sequence<U, 0, 1>{}
42 )));
43
44 BOOST_HANA_CONSTANT_CHECK(hana::equal(
45 std::integer_sequence<T, 0, 1, 2, 3>{},
46 std::integer_sequence<U, 0, 1, 2, 3>{}
47 ));
48 BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal(
49 std::integer_sequence<T, 0, 1, 2, 3, 5>{},
50 std::integer_sequence<U, 0, 1, 2, 3>{}
51 )));
52}