mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Remove constexpr again to see what the failures were
This commit is contained in:
parent
1c37688ccd
commit
8bd828744f
@ -112,10 +112,10 @@ public:
|
|||||||
auto set_handler(handler h) -> handler { return chandler.exchange(h ? h : []()noexcept{}); }
|
auto set_handler(handler h) -> handler { return chandler.exchange(h ? h : []()noexcept{}); }
|
||||||
auto get_handler() -> handler { return chandler; }
|
auto get_handler() -> handler { return chandler; }
|
||||||
|
|
||||||
constexpr void expects (bool b) { assertion(b); }
|
void expects (bool b) { assertion(b); }
|
||||||
constexpr void ensures (bool b) { assertion(b); }
|
void ensures (bool b) { assertion(b); }
|
||||||
private:
|
private:
|
||||||
constexpr void assertion(bool b) { if (!b) chandler.load()(); }
|
void assertion(bool b) { if (!b) chandler.load()(); }
|
||||||
|
|
||||||
#ifdef __cpp_guaranteed_copy_elision
|
#ifdef __cpp_guaranteed_copy_elision
|
||||||
std::atomic<handler> chandler; // current handler
|
std::atomic<handler> chandler; // current handler
|
||||||
|
Loading…
Reference in New Issue
Block a user