From 59f38376b9c2879b3106ef7328f68cae4cd0489e Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 17 Dec 2020 12:03:59 -0800 Subject: [PATCH] Change `auto` to `void` to satisfy some compilers about definition ordering --- include/gsl/assert | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gsl/assert b/include/gsl/assert index 7d05044..1c2d96e 100644 --- a/include/gsl/assert +++ b/include/gsl/assert @@ -109,11 +109,11 @@ public: return chandler.exchange(h); } auto get_handler() -> handler { return chandler; } - auto expects(bool b) { assertion(b); } - auto ensures(bool b) { assertion(b); } + void expects(bool b) { assertion(b); } + void ensures(bool b) { assertion(b); } private: - auto assertion(bool b) { if (!b) chandler.load()(); } + void assertion(bool b) { if (!b) chandler.load()(); } std::atomic chandler; };