2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-01 20:42:13 +00:00

Use finer grained assertions acknowledging Constants

This commit is contained in:
Louis Dionne
2014-08-05 10:37:54 -04:00
parent bf5eb10c46
commit d132db0ebf
436 changed files with 2672 additions and 2554 deletions

View File

@@ -10,7 +10,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <tuple>
#include <type_traits>
#include <boost/hana/detail/static_assert.hpp>
#include <boost/hana/detail/assert.hpp>
//! [includes]
#include <boost/hana.hpp>
@@ -29,7 +29,7 @@ assert(last(xs) == "345");
assert(tail(xs) == list('2', std::string{"345"}));
BOOST_HANA_STATIC_ASSERT(!is_empty(xs));
BOOST_HANA_CONSTANT_ASSERT(!is_empty(xs));
for_each(xs, [](auto x) {
std::cout << x;
@@ -54,9 +54,9 @@ auto ts = list(type<int*>, type<void>, type<char const>);
//! [ts]
//! [type_operations]
BOOST_HANA_STATIC_ASSERT(last(ts) == type<char const>);
BOOST_HANA_CONSTANT_ASSERT(last(ts) == type<char const>);
BOOST_HANA_STATIC_ASSERT(tail(ts) == list(type<void>, type<char const>));
BOOST_HANA_CONSTANT_ASSERT(tail(ts) == list(type<void>, type<char const>));
//! [type_operations]
//! [type_out]