forked from Alepha/Alepha
Assertions only in debug builds.
This commit is contained in:
@ -15,11 +15,13 @@ namespace Alepha::Hydrogen ::detail:: assertion_m
|
|||||||
inline void
|
inline void
|
||||||
assertion( const bool b )
|
assertion( const bool b )
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
if( not b )
|
if( not b )
|
||||||
{
|
{
|
||||||
throw build_exception< ProgrammerExpectationViolation >(
|
throw build_exception< ProgrammerExpectationViolation >(
|
||||||
"Expectation violated." );
|
"Expectation violated." );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user