inline_assertion_check

Helper for Assert()/Assume().

Synopsis

Declared in <util/check.h>

template<
    bool IS_ASSERT,
    typename T>
constexpr
T&&
inline_assertion_check(
    T&& val,
    std::source_location const& loc,
    std::string_view assertion);

Return Value

The forwarded value when the check passes.

Parameters

NameDescription
valThe value to check; the call aborts when it is falsey and checking is active.
locThe source location of the check.
assertionThe stringified checked expression.