From d2d1ef61cf69b433850b9dd6d030ea550f80f0b7 Mon Sep 17 00:00:00 2001 From: Sven Fink Date: Mon, 19 Oct 2020 09:48:50 +0200 Subject: [PATCH] Suppress warnings on gcc 9 --- include/fmt/core.h | 11 +++++++++-- include/fmt/format.h | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index ee98ea94..744c1a2c 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -801,8 +801,8 @@ template class iterator_buffer final : public buffer { template class iterator_buffer, enable_if_t::value, - typename Container::value_type>> final - : public buffer { + typename Container::value_type>> + final : public buffer { private: Container& container_; @@ -1371,6 +1371,10 @@ struct iterator_category> { using type = typename It::iterator_category; }; +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wctor-dtor-privacy" +#endif // Detect if *any* given type models the OutputIterator concept. template class is_output_iterator { // Check for mutability because all iterator categories derived from @@ -1388,6 +1392,9 @@ template class is_output_iterator { public: enum { value = !std::is_const>::value }; }; +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif template struct is_back_insert_iterator : std::false_type {}; diff --git a/include/fmt/format.h b/include/fmt/format.h index cdd30e49..be5f8fa5 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1946,7 +1946,14 @@ template ::value, double, T>; +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif using uint = typename dragonbox::float_info::carrier_uint; auto bits = bit_cast(value);