diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index 29c58ec13b15..d81c9ccb7948 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -70,6 +70,10 @@ void_t<> operator<<(std::basic_ostream&, signed char); template void_t<> operator<<(std::basic_ostream&, unsigned char); +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wctor-dtor-privacy" +#endif // Checks if T has a user-defined operator<< (e.g. not a member of // std::ostream). template class is_streamable { @@ -87,6 +91,9 @@ template class is_streamable { public: static const bool value = result::value; }; +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif // Write the content of buf to os. template