diff --git a/include/gsl/assert b/include/gsl/assert index f1fd7bc..2fb56ee 100644 --- a/include/gsl/assert +++ b/include/gsl/assert @@ -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 chandler; // current handler -#else + void assertion(bool b) { if (!b) chandler(); } handler chandler; -#endif }; auto static Default = contract_group( &gsl::details::terminate );