You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to test for preconditions and postconditions, but only when compiled in debug mode. Printing a message why something fails is useful. On the other hand, T8_ASSERT, similarly to the built-in assert, only accepts an expression, no optional message.
Describe the solution or feature you'd like
A convenience macro, e.g. T8_ASSERTF would be nice.
Describe alternatives you've considered
To achieve the same effect, we now need to use the more verbose
#if T8_ENABLE_DEBUG
if (!condition)
SC_ABORTF("Error message");
#endif
Alternatively, Boost has BOOST_ASSERT_MSG. There are other tricks, such as
Feature request
Is your feature request related to a problem? Please describe.
I would like to test for preconditions and postconditions, but only when compiled in debug mode. Printing a message why something fails is useful. On the other hand,
T8_ASSERT
, similarly to the built-inassert
, only accepts an expression, no optional message.Describe the solution or feature you'd like
A convenience macro, e.g.
T8_ASSERTF
would be nice.Describe alternatives you've considered
To achieve the same effect, we now need to use the more verbose
Alternatively, Boost has
BOOST_ASSERT_MSG
. There are other tricks, such asSee StackOverflow for more details.
Estimated priority
"Priority: low" Should be solved eventually
Additional context
This feature request concerns assertions, not logging. For that, functions such as
t8_global_productionf
already exist.The text was updated successfully, but these errors were encountered: