From 83ff868cc3cc65b6d7ac33ac2040dd28146bbff2 Mon Sep 17 00:00:00 2001 From: Jason Hiser <jdhiser@gmail.com> Date: Fri, 13 Sep 2019 15:22:04 -0400 Subject: [PATCH] added option to use throwing assert or real assert --- src/throw_assert.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/throw_assert.h b/src/throw_assert.h index 1b4416b..261bd4b 100644 --- a/src/throw_assert.h +++ b/src/throw_assert.h @@ -1,5 +1,10 @@ #ifndef throw_asssert + +#ifdef use_throwing_assert #define throw_assert(a) { if(!(a)) throw std::invalid_argument(#a); } +#else +#include <assert.h> +#define throw_assert(a) { assert(a); } #endif -- GitLab