File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -297,24 +297,33 @@ inline void assert(
297297 * @param print - function providing information string to print in case the assertion fails.
298298 * @param source_location - location of the assert() invocation in the source code.
299299 */
300+ #ifdef DEBUG
300301inline void assert (
301302 const std::function<bool ()>& condition_checker,
302303 const std::function<void (std::ostream&)>& print,
303304 const utki::source_location& source_location
304- #if CFG_CPP >= 20
305+ # if CFG_CPP >= 20
305306 = std_source_location::current()
306- #endif
307+ # endif
307308)
308309{
309- // Do DEBUG macro check because condition checker function must not be invoked in non-debug build.
310- #ifdef DEBUG
311310 assert (
312311 condition_checker (), //
313312 print,
314313 source_location
315314 );
316- #endif
317315}
316+ #else
317+ inline void assert (
318+ const std::function<bool ()>&,
319+ const std::function<void (std::ostream&)>&,
320+ const utki::source_location&
321+ # if CFG_CPP >= 20
322+ source_location = std_source_location::current()
323+ # endif
324+ )
325+ {}
326+ #endif
318327
319328/* *
320329 * @brief Assert that condion is true.
You can’t perform that action at this time.
0 commit comments