]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/test/experimental/view/transformed/is_empty.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / test / experimental / view / transformed / is_empty.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/experimental/view.hpp>
7#include <boost/hana/is_empty.hpp>
8#include <boost/hana/not.hpp>
9
10#include <support/seq.hpp>
11namespace hana = boost::hana;
12
13
14struct undefined { };
15
16int main() {
17 auto container = ::seq;
18
19 {
20 auto xs = container();
21 auto tr = hana::experimental::transformed(xs, undefined{});
22 BOOST_HANA_CONSTANT_CHECK(hana::is_empty(tr));
23 }
24
25 {
26 auto xs = container(undefined{});
27 auto tr = hana::experimental::transformed(xs, undefined{});
28 BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(tr)));
29 }
30
31 {
32 auto xs = container(undefined{}, undefined{});
33 auto tr = hana::experimental::transformed(xs, undefined{});
34 BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(tr)));
35 }
36}