VCCC  2024.05
VisualCamp Common C++ library
Runtime Assertion

Detailed Description

replace to gsl...

Macros

#define EXPECTS(expr, msg)   ASSERT_IMPL(expr, msg)
 
#define ENSURES(expr, msg)   ASSERT_IMPL(expr, msg)
 
#define BOUNDS_ASSERT(index, size)   EXPECTS((index) < (size), "index out of bounds")
 
#define ALWAYS_ASSERT(msg)   ASSERT_IMPL(false, msg)
 

Macro Definition Documentation

◆ ALWAYS_ASSERT

#define ALWAYS_ASSERT (   msg)    ASSERT_IMPL(false, msg)

◆ BOUNDS_ASSERT

#define BOUNDS_ASSERT (   index,
  size 
)    EXPECTS((index) < (size), "index out of bounds")

◆ ENSURES

#define ENSURES (   expr,
  msg 
)    ASSERT_IMPL(expr, msg)

◆ EXPECTS

#define EXPECTS (   expr,
  msg 
)    ASSERT_IMPL(expr, msg)