• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright Louis Dionne 2013-2017
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/is_empty.hpp>
7 #include <boost/hana/not.hpp>
8 #include <boost/hana/tuple.hpp>
9 namespace hana = boost::hana;
10 
11 
12 struct x0;
13 struct x1;
14 struct x2;
15 
main()16 int main() {
17     // tuple_t
18     BOOST_HANA_CONSTANT_CHECK(hana::is_empty(hana::tuple_t<>));
19     BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(hana::tuple_t<x0>)));
20     BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(hana::tuple_t<x0, x1>)));
21     BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(hana::tuple_t<x0, x1, x2>)));
22 
23     // tuple_c
24     BOOST_HANA_CONSTANT_CHECK(hana::is_empty(hana::tuple_c<int>));
25     BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(hana::tuple_c<int, 0>)));
26     BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(hana::tuple_c<int, 0, 1>)));
27     BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::is_empty(hana::tuple_c<int, 0, 1, 2>)));
28 }
29