static_assert is not affected by NDEBUG

This commit is contained in:
Sébastien Loriot 2021-09-08 10:38:21 +02:00
parent 8b228a450f
commit c04f88368f
1 changed files with 2 additions and 14 deletions

View File

@ -106,24 +106,12 @@ inline bool possibly(Uncertain<bool> c);
# define CGAL_assume_code(CODE) CGAL_assertion_code(CODE)
#endif // no CGAL_NO_ASSERTIONS
# if defined(CGAL_NO_ASSERTIONS)
# define CGAL_static_assertion(EX) \
static_assert(true, "")
# define CGAL_static_assertion_msg(EX,MSG) \
static_assert(true, "")
# else // no CGAL_NO_ASSERTIONS
# define CGAL_static_assertion(EX) \
# define CGAL_static_assertion(EX) \
static_assert(EX, #EX)
# define CGAL_static_assertion_msg(EX,MSG) \
# define CGAL_static_assertion_msg(EX,MSG) \
static_assert(EX, MSG)
# endif // no CGAL_NO_ASSERTIONS
#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS)
# define CGAL_exactness_assertion(EX) (static_cast<void>(0))
# define CGAL_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))