From 9ca582d9dab91a59bdd4c399b903def0f675efdb Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Mon, 20 Nov 2017 14:50:48 -0500 Subject: [PATCH] Silence GCC conversion warning for bitfields * Used only in weekday_indexed. --- include/date/date.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/date/date.h b/include/date/date.h index fc46816..be50b42 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -1877,6 +1877,10 @@ weekday_indexed::ok() const NOEXCEPT return weekday().ok() && 1 <= index_ && index_ <= 5; } +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wconversion" + CONSTCD11 inline weekday_indexed::weekday_indexed(const date::weekday& wd, unsigned index) NOEXCEPT @@ -1884,6 +1888,9 @@ weekday_indexed::weekday_indexed(const date::weekday& wd, unsigned index) NOEXCE , index_(static_cast(index)) {} +# pragma GCC diagnostic pop +#endif // __GNUC__ + template inline std::basic_ostream&