]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/test/range/at.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / range / 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/assert.hpp>
6#include <boost/hana/at.hpp>
7#include <boost/hana/core/make.hpp>
8#include <boost/hana/equal.hpp>
9#include <boost/hana/integral_constant.hpp>
10#include <boost/hana/range.hpp>
11namespace hana = boost::hana;
12
13
14int main() {
15 BOOST_HANA_CONSTANT_CHECK(hana::equal(
16 hana::make_range(hana::int_c<0>, hana::int_c<10>)[hana::int_c<2>],
17 hana::int_c<2>
18 ));
19
20 BOOST_HANA_CONSTANT_CHECK(hana::equal(
21 hana::at(hana::make_range(hana::int_c<0>, hana::int_c<1>), hana::int_c<0>),
22 hana::int_c<0>
23 ));
24 BOOST_HANA_CONSTANT_CHECK(hana::equal(
25 hana::at(hana::make_range(hana::int_c<0>, hana::int_c<2>), hana::int_c<0>),
26 hana::int_c<0>
27 ));
28 BOOST_HANA_CONSTANT_CHECK(hana::equal(
29 hana::at(hana::make_range(hana::int_c<0>, hana::int_c<2>), hana::int_c<1>),
30 hana::int_c<1>
31 ));
32 BOOST_HANA_CONSTANT_CHECK(hana::equal(
33 hana::at(hana::make_range(hana::int_c<4>, hana::int_c<90>), hana::int_c<46>),
34 hana::int_c<50>
35 ));
36}