]>
Commit | Line | Data |
---|---|---|
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> | |
11 | namespace hana = boost::hana; | |
12 | ||
13 | ||
14 | template <int> struct undefined { }; | |
15 | ||
16 | int main() { | |
17 | auto container = ::seq; | |
18 | ||
19 | { | |
20 | auto storage1 = container(); | |
21 | auto storage2 = container(); | |
22 | auto joined = hana::experimental::joined(storage1, storage2); | |
23 | BOOST_HANA_CONSTANT_CHECK(hana::is_empty(joined)); | |
24 | } | |
25 | { | |
26 | auto storage1 = container(undefined<0>{}); | |
27 | auto storage2 = container(); | |
28 | auto joined = hana::experimental::joined(storage1, storage2); | |
29 | BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(joined))); | |
30 | } | |
31 | { | |
32 | auto storage1 = container(undefined<0>{}); | |
33 | auto storage2 = container(undefined<1>{}); | |
34 | auto joined = hana::experimental::joined(storage1, storage2); | |
35 | BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(joined))); | |
36 | } | |
37 | { | |
38 | auto storage1 = container(); | |
39 | auto storage2 = container(undefined<0>{}); | |
40 | auto joined = hana::experimental::joined(storage1, storage2); | |
41 | BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(joined))); | |
42 | } | |
43 | } |