]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/assert/commas.cpp
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)
5 #include <boost/hana/assert.hpp>
7 #include <support/cnumeric.hpp>
8 namespace hana
= boost::hana
;
11 // This test makes sure that we can use conditions with multiple comma-separated
12 // arguments to the non-MSG versions of the BOOST_HANA_XXX_ASSERT macros.
14 template <bool value
, typename
...>
15 bool runtime_bool() { return value
; }
17 template <bool value
, typename
...>
18 auto constant_bool() { return make_cnumeric
<bool, value
>(); }
21 BOOST_HANA_CONSTANT_ASSERT(constant_bool
<true, void>());
22 BOOST_HANA_CONSTANT_ASSERT(constant_bool
<true, void, void>());
23 BOOST_HANA_CONSTANT_ASSERT(constant_bool
<true, void, void, void>());
25 BOOST_HANA_RUNTIME_ASSERT(runtime_bool
<true, void>());
26 BOOST_HANA_RUNTIME_ASSERT(runtime_bool
<true, void, void>());
27 BOOST_HANA_RUNTIME_ASSERT(runtime_bool
<true, void, void, void>());
29 BOOST_HANA_ASSERT(runtime_bool
<true, void>());
30 BOOST_HANA_ASSERT(runtime_bool
<true, void, void>());
31 BOOST_HANA_ASSERT(runtime_bool
<true, void, void, void>());
32 BOOST_HANA_ASSERT(constant_bool
<true, void>());
33 BOOST_HANA_ASSERT(constant_bool
<true, void, void>());
34 BOOST_HANA_ASSERT(constant_bool
<true, void, void, void>());