From 901a6b81198fd353bfb8b62ed145eddca54f433c Mon Sep 17 00:00:00 2001 From: Corbin Hughes Date: Sun, 27 Sep 2015 23:28:18 -0500 Subject: [PATCH] Changed GSL.assert macros to functions --- include/gsl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/gsl.h b/include/gsl.h index fed3b6c..c8196ad 100644 --- a/include/gsl.h +++ b/include/gsl.h @@ -20,6 +20,7 @@ #define GSL_GSL_H #include "array_view.h" // array_view, strided_array_view... +#include "fail_fast.h" // fail_fast_assert #include "string_view.h" // zstring, string_view, zstring_builder... #include @@ -38,8 +39,8 @@ using owner = T; // // GSL.assert: assertions // -#define Expects(x) Guide::fail_fast_assert((x)) -#define Ensures(x) Guide::fail_fast_assert((x)) +inline void Expects(bool cond) { Guide::fail_fast_assert(cond); } +inline void Ensures(bool cond) { Guide::fail_fast_assert(cond); } // // GSL.util: utilities