mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Expects and Ensures are no longer macros to enable overloading
This commit is contained in:
parent
f1595186ea
commit
75df3ccaca
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user