Change auto to void to satisfy some compilers about definition ordering

This commit is contained in:
Herb Sutter 2020-12-17 12:03:59 -08:00
parent dd45e5cfbd
commit 59f38376b9

View File

@ -109,11 +109,11 @@ public:
return chandler.exchange(h); } return chandler.exchange(h); }
auto get_handler() -> handler { return chandler; } auto get_handler() -> handler { return chandler; }
auto expects(bool b) { assertion(b); } void expects(bool b) { assertion(b); }
auto ensures(bool b) { assertion(b); } void ensures(bool b) { assertion(b); }
private: private:
auto assertion(bool b) { if (!b) chandler.load()(); } void assertion(bool b) { if (!b) chandler.load()(); }
std::atomic<handler> chandler; std::atomic<handler> chandler;
}; };