mirror of
https://github.com/microsoft/GSL.git
synced 2025-01-18 09:44:59 -05:00
Handler shouldn't be internally synchronized
This commit is contained in:
parent
8bd828744f
commit
a45265a75e
@ -115,13 +115,8 @@ public:
|
||||
void expects (bool b) { assertion(b); }
|
||||
void ensures (bool b) { assertion(b); }
|
||||
private:
|
||||
void assertion(bool b) { if (!b) chandler.load()(); }
|
||||
|
||||
#ifdef __cpp_guaranteed_copy_elision
|
||||
std::atomic<handler> chandler; // current handler
|
||||
#else
|
||||
void assertion(bool b) { if (!b) chandler(); }
|
||||
handler chandler;
|
||||
#endif
|
||||
};
|
||||
|
||||
auto static Default = contract_group( &gsl::details::terminate );
|
||||
|
Loading…
Reference in New Issue
Block a user