From 9033021831ab806f6825db1a13066cd3e856744f Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Fri, 18 Dec 2020 11:34:25 -0800 Subject: [PATCH] Removed stray .exchange --- include/gsl/assert | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/gsl/assert b/include/gsl/assert index 2fb56ee..b5d2669 100644 --- a/include/gsl/assert +++ b/include/gsl/assert @@ -18,6 +18,7 @@ #define GSL_CONTRACTS_H #include +#include // // Temporary until MSVC STL supports no-exceptions mode. @@ -109,7 +110,7 @@ public: #endif contract_group (handler h) { set_handler(h); } - auto set_handler(handler h) -> handler { return chandler.exchange(h ? h : []()noexcept{}); } + auto set_handler(handler h) -> handler { return std::exchange(chandler, h ? h : []()noexcept{}); } auto get_handler() -> handler { return chandler; } void expects (bool b) { assertion(b); }