/usr/include/boost/hana
NameSizeModeActions
concept/-0755rm
core/-0755rm
detail/-0755rm
experimental/-0755rm
ext/-0755rm
functional/-0755rm
fwd/-0755rm
accessors.hpp15130644editdlrm
adapt_adt.hpp4220644editdlrm
adapt_struct.hpp4370644editdlrm
adjust.hpp16980644editdlrm
adjust_if.hpp25150644editdlrm
all.hpp13270644editdlrm
all_of.hpp15700644editdlrm
and.hpp16670644editdlrm
any.hpp13270644editdlrm
any_of.hpp75310644editdlrm
ap.hpp24960644editdlrm
append.hpp23570644editdlrm
assert.hpp163250644editdlrm
at.hpp16590644editdlrm
at_key.hpp30090644editdlrm
back.hpp15340644editdlrm
basic_tuple.hpp94550644editdlrm
bool.hpp97470644editdlrm
cartesian_product.hpp38600644editdlrm
chain.hpp14880644editdlrm
comparing.hpp12220644editdlrm
concat.hpp27120644editdlrm
concept.hpp13010644editdlrm
config.hpp71520644editdlrm
contains.hpp15600644editdlrm
core.hpp6100644editdlrm
count.hpp14960644editdlrm
count_if.hpp31370644editdlrm
cycle.hpp42750644editdlrm
define_struct.hpp4420644editdlrm
difference.hpp11160644editdlrm
div.hpp38040644editdlrm
drop_back.hpp24750644editdlrm
drop_front.hpp17960644editdlrm
drop_front_exactly.hpp30300644editdlrm
drop_while.hpp31740644editdlrm
duplicate.hpp13920644editdlrm
empty.hpp14000644editdlrm
equal.hpp80120644editdlrm
erase_key.hpp10290644editdlrm
eval.hpp17980644editdlrm
eval_if.hpp33810644editdlrm
extend.hpp14980644editdlrm
extract.hpp12480644editdlrm
fill.hpp22160644editdlrm
filter.hpp44730644editdlrm
find.hpp17320644editdlrm
find_if.hpp40110644editdlrm
first.hpp12420644editdlrm
flatten.hpp17690644editdlrm
fold.hpp3780644editdlrm
fold_left.hpp31280644editdlrm
fold_right.hpp31470644editdlrm
for_each.hpp18630644editdlrm
front.hpp13150644editdlrm
functional.hpp11860644editdlrm
fuse.hpp13090644editdlrm
greater.hpp24010644editdlrm
greater_equal.hpp25520644editdlrm
group.hpp55430644editdlrm
hash.hpp35720644editdlrm
if.hpp18340644editdlrm
index_if.hpp34850644editdlrm
insert.hpp16200644editdlrm
insert_range.hpp21710644editdlrm
integral_constant.hpp3890644editdlrm
intersection.hpp11000644editdlrm
intersperse.hpp25860644editdlrm
is_disjoint.hpp20400644editdlrm
is_empty.hpp12440644editdlrm
is_subset.hpp29190644editdlrm
keys.hpp13070644editdlrm
lazy.hpp79470644editdlrm
length.hpp15540644editdlrm
less.hpp53220644editdlrm
less_equal.hpp24850644editdlrm
lexicographical_compare.hpp43440644editdlrm
lift.hpp15000644editdlrm
map.hpp225930644editdlrm
max.hpp17590644editdlrm
maximum.hpp33480644editdlrm
members.hpp19700644editdlrm
min.hpp17590644editdlrm
minimum.hpp33530644editdlrm
minus.hpp40050644editdlrm
mod.hpp38040644editdlrm
monadic_compose.hpp15830644editdlrm
monadic_fold_left.hpp48620644editdlrm
monadic_fold_right.hpp48820644editdlrm
mult.hpp37470644editdlrm
negate.hpp18570644editdlrm
none.hpp13400644editdlrm
none_of.hpp15320644editdlrm
not.hpp22170644editdlrm
not_equal.hpp19820644editdlrm
one.hpp24320644editdlrm
optional.hpp154220644editdlrm
or.hpp18600644editdlrm
ordering.hpp12310644editdlrm
pair.hpp80480644editdlrm
partition.hpp41990644editdlrm
permutations.hpp25990644editdlrm
plus.hpp37590644editdlrm
power.hpp19540644editdlrm
prefix.hpp15970644editdlrm
prepend.hpp23720644editdlrm
product.hpp17010644editdlrm
range.hpp99100644editdlrm
remove.hpp16950644editdlrm
remove_at.hpp29890644editdlrm
remove_if.hpp16440644editdlrm
remove_range.hpp38850644editdlrm
repeat.hpp17930644editdlrm
replace.hpp17970644editdlrm
replace_if.hpp17640644editdlrm
replicate.hpp22820644editdlrm
reverse.hpp18020644editdlrm
reverse_fold.hpp11440644editdlrm
scan_left.hpp50600644editdlrm
scan_right.hpp51380644editdlrm
second.hpp12530644editdlrm
set.hpp118540644editdlrm
size.hpp3750644editdlrm
slice.hpp34070644editdlrm
sort.hpp88550644editdlrm
span.hpp26290644editdlrm
string.hpp123100644editdlrm
suffix.hpp15830644editdlrm
sum.hpp16610644editdlrm
symmetric_difference.hpp13940644editdlrm
take_back.hpp25190644editdlrm
take_front.hpp24710644editdlrm
take_while.hpp17760644editdlrm
tap.hpp16160644editdlrm
then.hpp16880644editdlrm
traits.hpp101720644editdlrm
transform.hpp24110644editdlrm
tuple.hpp116510644editdlrm
type.hpp100820644editdlrm
unfold_left.hpp22040644editdlrm
unfold_right.hpp22240644editdlrm
union.hpp10300644editdlrm
unique.hpp23610644editdlrm
unpack.hpp51750644editdlrm
value.hpp15610644editdlrm
version.hpp20320644editdlrm
while.hpp44410644editdlrm
zero.hpp24540644editdlrm
zip.hpp14620644editdlrm
zip_shortest.hpp16040644editdlrm
zip_shortest_with.hpp21160644editdlrm
zip_with.hpp22920644editdlrm
Edit: /usr/include/boost/hana/assert.hpp (16325B)
/*! @file Defines macros to perform different kinds of assertions. @copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_ASSERT_HPP #define BOOST_HANA_ASSERT_HPP #include #include #include #include #include #include #include #if defined(BOOST_HANA_DOXYGEN_INVOKED) //! @ingroup group-assertions //! Expands to a runtime assertion. //! //! Given a condition known at runtime, this macro expands to a runtime //! assertion similar to the `assert` macro. The provided condition must //! be explicitly convertible to a `bool`, and it must not be a model of //! the `Constant` concept. If the condition is a `Constant`, a static //! assertion will be triggered, asking you to use the //! `BOOST_HANA_CONSTANT_ASSERT` macro instead. //! //! @note //! This macro may only be used at function scope. # define BOOST_HANA_RUNTIME_ASSERT(condition) unspecified //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_RUNTIME_ASSERT`, but allows providing a //! custom failure message. //! //! @warning //! Conditions that contain multiple comma-separated elements should be //! parenthesized. # define BOOST_HANA_RUNTIME_ASSERT_MSG(condition, message) unspecified //! @ingroup group-assertions //! Compile-time assertion for `Constant`s. //! //! Given a condition known at compile-time in the form of a `Constant`, //! this macro expands to a compile-time assertion similar to a `static_assert`. //! The provided condition must be a model of the `Constant` concept, in //! which case its value is retrieved using `hana::value` and then converted //! to a `bool`. If the condition is not a `Constant`, a static assertion //! will be triggered, asking you to use the `BOOST_HANA_RUNTIME_ASSERT` //! macro instead. //! //! This macro may be used at global/namespace scope and function scope //! only; it may not be used at class scope. Note that the condition may //! never be evaluated at runtime. Hence, any side effect may not take //! place (but you shouldn't rely on side effects inside assertions anyway). # define BOOST_HANA_CONSTANT_ASSERT(condition) unspecified //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_CONSTANT_ASSERT`, but allows providing a //! custom failure message. //! //! @warning //! Conditions that contain multiple comma-separated elements should be //! parenthesized. # define BOOST_HANA_CONSTANT_ASSERT_MSG(condition, message) unspecified //! @ingroup group-assertions //! Expands to the strongest form of assertion possible for the given //! condition. //! //! Given a condition, `BOOST_HANA_ASSERT` expands either to a compile-time //! or to a runtime assertion, depending on whether the value of the //! condition is known at compile-time or at runtime. Compile-time //! assertions are always preferred over runtime assertions. If the //! condition is a model of the `Constant` concept, its value (retrievable //! with `hana::value`) is assumed to be explicitly convertible to `bool`, //! and a compile-time assertion is performed on it. Otherwise, the //! condition itself is assumed to be explicitly convertible to `bool`, //! and a runtime assertion is performed on it. //! //! If the assertion can be carried out at compile-time, the condition //! is not guaranteed to be evaluated at runtime at all (but it may). //! Hence, in general, you shouldn't rely on side effects that take place //! inside an assertion. //! //! @note //! This macro may only be used at function scope. # define BOOST_HANA_ASSERT(condition) unspecified //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_ASSERT`, but allows providing a custom //! failure message. //! //! @warning //! Conditions that contain multiple comma-separated elements should be //! parenthesized. # define BOOST_HANA_ASSERT_MSG(condition, message) unspecified //! @ingroup group-assertions //! Expands to a static assertion or a runtime assertion, depending on //! whether `constexpr` lambdas are supported. //! //! This macro is used to assert on a condition that would be a constant //! expression if constexpr lambdas were supported. Right now, constexpr //! lambdas are not supported, and this is always a runtime assertion. //! Specifically, this is equivalent to `BOOST_HANA_RUNTIME_ASSERT`. # define BOOST_HANA_CONSTEXPR_ASSERT(condition) unspecified //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_CONSTEXPR_ASSERT`, but allows providing a //! custom failure message. # define BOOST_HANA_CONSTEXPR_ASSERT_MSG(condition, message) unspecified #elif defined(BOOST_HANA_CONFIG_DISABLE_ASSERTIONS) # define BOOST_HANA_CONSTANT_ASSERT(...) /* nothing */ # define BOOST_HANA_CONSTANT_ASSERT_MSG(condition, message) /* nothing */ # define BOOST_HANA_RUNTIME_ASSERT(...) /* nothing */ # define BOOST_HANA_RUNTIME_ASSERT_MSG(condition, message) /* nothing */ # define BOOST_HANA_ASSERT(...) /* nothing */ # define BOOST_HANA_ASSERT_MSG(condition, message) /* nothing */ # define BOOST_HANA_CONSTEXPR_ASSERT(...) /* nothing */ # define BOOST_HANA_CONSTEXPR_ASSERT_MSG(condition, message) /* nothing */ #else ////////////////////////////////////////////////////////////////////////////// // BOOST_HANA_RUNTIME_ASSERT and BOOST_HANA_RUNTIME_ASSERT_MSG ////////////////////////////////////////////////////////////////////////////// # define BOOST_HANA_RUNTIME_ASSERT_MSG(condition, message) \ BOOST_HANA_RUNTIME_CHECK_MSG(condition, message) \ /**/ # define BOOST_HANA_RUNTIME_ASSERT(...) \ BOOST_HANA_RUNTIME_CHECK(__VA_ARGS__) \ /**/ ////////////////////////////////////////////////////////////////////////////// // BOOST_HANA_CONSTANT_ASSERT and BOOST_HANA_CONSTANT_ASSERT_MSG ////////////////////////////////////////////////////////////////////////////// # define BOOST_HANA_CONSTANT_ASSERT_MSG(condition, message) \ BOOST_HANA_CONSTANT_CHECK_MSG(condition, message) \ /**/ # define BOOST_HANA_CONSTANT_ASSERT(...) \ BOOST_HANA_CONSTANT_CHECK(__VA_ARGS__) \ /**/ ////////////////////////////////////////////////////////////////////////////// // BOOST_HANA_ASSERT and BOOST_HANA_ASSERT_MSG ////////////////////////////////////////////////////////////////////////////// # define BOOST_HANA_ASSERT_MSG(condition, message) \ BOOST_HANA_CHECK_MSG(condition, message) \ /**/ # define BOOST_HANA_ASSERT(...) \ BOOST_HANA_CHECK(__VA_ARGS__) \ /**/ ////////////////////////////////////////////////////////////////////////////// // BOOST_HANA_CONSTEXPR_ASSERT and BOOST_HANA_CONSTEXPR_ASSERT_MSG ////////////////////////////////////////////////////////////////////////////// # define BOOST_HANA_CONSTEXPR_ASSERT_MSG(condition, message) \ BOOST_HANA_CONSTEXPR_CHECK_MSG(condition, message) \ /**/ # define BOOST_HANA_CONSTEXPR_ASSERT(...) \ BOOST_HANA_CONSTEXPR_CHECK(__VA_ARGS__) \ /**/ #endif ////////////////////////////////////////////////////////////////////////////// // BOOST_HANA_RUNTIME_CHECK and BOOST_HANA_RUNTIME_CHECK_MSG ////////////////////////////////////////////////////////////////////////////// //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_RUNTIME_ASSERT_MSG`, but not influenced by the //! `BOOST_HANA_CONFIG_DISABLE_ASSERTIONS` config macro. For internal use only. # define BOOST_HANA_RUNTIME_CHECK_MSG(condition, message) \ do { \ auto __hana_tmp = condition; \ static_assert(!::boost::hana::Constant::value,\ "the expression (" # condition ") yields a Constant; " \ "use BOOST_HANA_CONSTANT_ASSERT instead"); \ \ if (!static_cast(__hana_tmp)) { \ ::std::fprintf(stderr, "Assertion failed: " \ "(%s), function %s, file %s, line %i.\n", \ message, __func__, __FILE__, __LINE__); \ ::std::abort(); \ } \ } while (false); \ static_assert(true, "force trailing semicolon") \ /**/ //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_RUNTIME_ASSERT`, but not influenced by the //! `BOOST_HANA_CONFIG_DISABLE_ASSERTIONS` config macro. For internal use only. # define BOOST_HANA_RUNTIME_CHECK(...) \ BOOST_HANA_RUNTIME_CHECK_MSG( \ (__VA_ARGS__), \ BOOST_HANA_PP_STRINGIZE(__VA_ARGS__) \ ) \ /**/ ////////////////////////////////////////////////////////////////////////////// // BOOST_HANA_CONSTANT_CHECK and BOOST_HANA_CONSTANT_CHECK_MSG ////////////////////////////////////////////////////////////////////////////// //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_CONSTANT_ASSERT_MSG`, but not influenced by the //! `BOOST_HANA_CONFIG_DISABLE_ASSERTIONS` config macro. For internal use only. # define BOOST_HANA_CONSTANT_CHECK_MSG(condition, message) \ auto BOOST_HANA_PP_CONCAT(__hana_tmp_, __LINE__) = condition; \ static_assert(::boost::hana::Constant< \ decltype(BOOST_HANA_PP_CONCAT(__hana_tmp_, __LINE__)) \ >::value, \ "the expression " # condition " does not yield a Constant; " \ "use BOOST_HANA_RUNTIME_ASSERT instead"); \ static_assert(::boost::hana::value< \ decltype(BOOST_HANA_PP_CONCAT(__hana_tmp_, __LINE__)) \ >(), message); \ static_assert(true, "force trailing semicolon") \ /**/ //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_CONSTANT_ASSERT`, but not influenced by the //! `BOOST_HANA_CONFIG_DISABLE_ASSERTIONS` config macro. For internal use only. # define BOOST_HANA_CONSTANT_CHECK(...) \ BOOST_HANA_CONSTANT_CHECK_MSG( \ (__VA_ARGS__), \ BOOST_HANA_PP_STRINGIZE(__VA_ARGS__) \ ) \ /**/ ////////////////////////////////////////////////////////////////////////////// // BOOST_HANA_CHECK and BOOST_HANA_CHECK_MSG ////////////////////////////////////////////////////////////////////////////// //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_ASSERT_MSG`, but not influenced by the //! `BOOST_HANA_CONFIG_DISABLE_ASSERTIONS` config macro. For internal use only. # define BOOST_HANA_CHECK_MSG(condition, message) \ do { \ auto __hana_tmp = condition; \ ::boost::hana::if_(::boost::hana::bool_c< \ ::boost::hana::Constant::value>, \ [](auto expr) { \ static_assert(::boost::hana::value(), \ message); \ }, \ [](auto expr) { \ if (!static_cast(expr)) { \ ::std::fprintf(stderr, "Assertion failed: " \ "(%s), function %s, file %s, line %i.\n", \ message, __func__, __FILE__, __LINE__); \ ::std::abort(); \ } \ } \ )(__hana_tmp); \ } while (false); \ static_assert(true, "force trailing semicolon") \ /**/ //! @ingroup group-assertions //! Equivalent to `BOOST_HANA__ASSERT`, but not influenced by the //! `BOOST_HANA_CONFIG_DISABLE_ASSERTIONS` config macro. For internal use only. # define BOOST_HANA_CHECK(...) \ BOOST_HANA_CHECK_MSG( \ (__VA_ARGS__), \ BOOST_HANA_PP_STRINGIZE(__VA_ARGS__) \ ) \ /**/ ////////////////////////////////////////////////////////////////////////////// // BOOST_HANA_CONSTEXPR_CHECK and BOOST_HANA_CONSTEXPR_CHECK_MSG ////////////////////////////////////////////////////////////////////////////// #if defined(BOOST_HANA_DOXYGEN_INVOKED) //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_CONSTEXPR_ASSERT_MSG`, but not influenced by //! the `BOOST_HANA_CONFIG_DISABLE_ASSERTIONS` config macro. //! For internal use only. # define BOOST_HANA_CONSTEXPR_CHECK_MSG(condition, message) implementation-defined //! @ingroup group-assertions //! Equivalent to `BOOST_HANA_CONSTEXPR_ASSERT`, but not influenced by the //! `BOOST_HANA_CONFIG_DISABLE_ASSERTIONS` config macro. //! For internal use only. # define BOOST_HANA_CONSTEXPR_CHECK(...) implementation-defined #elif defined(BOOST_HANA_CONFIG_HAS_CONSTEXPR_LAMBDA) # define BOOST_HANA_CONSTEXPR_CHECK_MSG(condition, message) \ static_assert(condition, message) \ /**/ # define BOOST_HANA_CONSTEXPR_CHECK(...) \ static_assert((__VA_ARGS__), BOOST_HANA_PP_STRINGIZE(__VA_ARGS__)) \ /**/ #else # define BOOST_HANA_CONSTEXPR_CHECK_MSG(condition, message) \ BOOST_HANA_RUNTIME_CHECK_MSG(condition, message) \ /**/ # define BOOST_HANA_CONSTEXPR_CHECK(...) \ BOOST_HANA_CONSTEXPR_CHECK_MSG( \ (__VA_ARGS__), \ BOOST_HANA_PP_STRINGIZE(__VA_ARGS__) \ ) \ /**/ #endif #endif // !BOOST_HANA_ASSERT_HPP