Skip to content

Commit

Permalink
Suppress gcc warning on privates-only class
Browse files Browse the repository at this point in the history
Since gcc 9 it warns about is_streamable to have only private methods.
  • Loading branch information
Finkman committed Dec 7, 2020
1 parent a6fafe2 commit 770699a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/fmt/ostream.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ void_t<> operator<<(std::basic_ostream<char, Traits>&, signed char);
template <typename Traits>
void_t<> operator<<(std::basic_ostream<char, Traits>&, 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 <typename T, typename Char> class is_streamable {
Expand All @@ -87,6 +91,9 @@ template <typename T, typename Char> 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 <typename Char>
Expand Down

0 comments on commit 770699a

Please sign in to comment.