Main namespace for dxx::assert module.
More...
|
| struct | failure |
| | A default error type that is thrown when the assertion fails. More...
|
|
| template<std::constructible_from< std::string > Failure = failure> |
| void | always (bool condition, std::source_location st=std::source_location::current()) |
| | Check if the condition is true and throw Failure if it's not.
|
| template<std::constructible_from< std::string > Failure = failure> |
| void | debug (bool condition, std::source_location st=std::source_location::current()) |
| | Same as assert but only performs the check if the library is built in Debug mode.
|
Main namespace for dxx::assert module.
◆ always()
template<std::constructible_from< std::string > Failure = failure>
| void dxx::assert::always |
( |
bool | condition, |
|
|
std::source_location | st = std::source_location::current() ) |
|
inlineexport |
Check if the condition is true and throw Failure if it's not.
- condition
- the condition to check
- st
- if <stacktrace> is not available, defaut argument provides minimal info about the failure location
◆ debug()
template<std::constructible_from< std::string > Failure = failure>
| void dxx::assert::debug |
( |
bool | condition, |
|
|
std::source_location | st = std::source_location::current() ) |
|
inlineexport |
Same as assert but only performs the check if the library is built in Debug mode.
- condition
- the condition to check
- st
- if <stacktrace> is not available, defaut argument provides minimal info about the failure location