kassert  0.2.2
Assertion library for KaMPIng
Loading...
Searching...
No Matches
Expression Expansions

Utility to expand different inputs as error message. More...

Typedefs

using kassert::internal::OStreamLogger = Logger<std::ostream&>
 Logger writing all output to a std::ostream. This specialization is used to generate the KASSERT error messages.
 
using kassert::internal::RrefOStringstreamLogger = Logger<std::ostringstream&&>
 Logger writing all output to a rvalue std::ostringstream. This specialization is used to generate the custom error message for THROWING_KASSERT exceptions.
 

Functions

template<typename StreamT , typename ValueT >
void kassert::internal::stringify_value (Logger< StreamT > &out, ValueT const &value)
 Stringify a value using the given assertion logger. If the value cannot be streamed into the logger, print <?> instead.
 

Variables

template<typename StreamT , typename ValueT >
constexpr bool kassert::internal::is_streamable_type = is_streamable_type_impl<StreamT, ValueT>::value
 Determines whether a value of type ValueT can be streamed into an output stream of type StreamT.
 

Detailed Description

Utility to expand different inputs as error message.

Function Documentation

◆ stringify_value()

void kassert::internal::stringify_value ( Logger< StreamT > & out,
ValueT const & value )

Stringify a value using the given assertion logger. If the value cannot be streamed into the logger, print <?> instead.

Template Parameters
StreamTThe underlying streaming object of the assertion logger.
ValueTThe type of the value to be stringified.
Parameters
outThe assertion logger.
valueThe value to be stringified.

Variable Documentation

◆ is_streamable_type

constexpr bool kassert::internal::is_streamable_type = is_streamable_type_impl<StreamT, ValueT>::value
constexpr

Determines whether a value of type ValueT can be streamed into an output stream of type StreamT.

Template Parameters
StreamTAn output stream overloading the << operator.
ValueTA value type that may or may not be used with StreamT::operator<<.