From d5e96f099182f3a7a763d86c48fab0598d1b65e6 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Wed, 20 Mar 2019 21:24:01 -0400 Subject: [PATCH] Suppress VS-15 warning about concerning conditional expression is constant Thanks to https://github.com/ujos for the report. --- include/date/date.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/date/date.h b/include/date/date.h index 51cea14..b1e3d9a 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -77,6 +77,12 @@ # endif #endif +#ifdef _MSC_VER +# pragma warning(push) +// warning C4127: conditional expression is constant +# pragma warning(disable : 4127) +#endif + namespace date { @@ -7933,6 +7939,10 @@ operator<<(std::basic_ostream& os, } // namespace date +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef __GNUC__ # pragma GCC diagnostic pop #endif