Skip to content

Commit

Permalink
Test is_streamable with overloaded comma operators
Browse files Browse the repository at this point in the history
  • Loading branch information
morinmorin authored and vitaut committed Feb 6, 2019
1 parent 430e6ac commit 9a0a24f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/ostream-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ static std::wostream& operator<<(std::wostream& os, const Date& d) {
return os;
}

// Make sure that overloaded comma operators do no harm to is_streamable.
struct type_with_comma_op {};
template <typename T> void operator,(type_with_comma_op, const T&);
template <typename T> type_with_comma_op operator<<(T&, const Date&);

enum TestEnum {};
static std::ostream& operator<<(std::ostream& os, TestEnum) {
return os << "TestEnum";
Expand Down

0 comments on commit 9a0a24f

Please sign in to comment.