Expects and Ensures are no longer macros to enable overloading

This commit is contained in:
Treb Connell 2015-10-08 12:49:37 -07:00
parent f1595186ea
commit 75df3ccaca

View File

@ -53,8 +53,10 @@ inline void fail_fast_assert(bool cond, const char* const) { if (!cond) std::ter
// //
// GSL.assert: assertions // GSL.assert: assertions
// //
#define Expects(x, ...) gsl::fail_fast_assert((x), __VA_ARGS__) inline void Expects(bool cond) { fail_fast_assert(cond); }
#define Ensures(x, ...) gsl::fail_fast_assert((x), __VA_ARGS__) inline void Expects(bool cond, const char* msg) { fail_fast_assert(cond, msg); }
inline void Ensures(bool cond) { fail_fast_assert(cond); }
inline void Ensures(bool cond, const char* msg) { fail_fast_assert(cond, msg); }
} // namespace gsl } // namespace gsl