]>
Commit | Line | Data |
---|---|---|
1 | // Copyright Louis Dionne 2013-2022 | |
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> | |
11 | namespace hana = boost::hana; | |
12 | ||
13 | ||
14 | struct undefined { }; | |
15 | ||
16 | int 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 | } |