From 9a0a24f90bdbc91c8b84a061e24195127f0addbf Mon Sep 17 00:00:00 2001 From: morinmorin Date: Wed, 6 Feb 2019 19:45:14 +0900 Subject: [PATCH] Test is_streamable with overloaded comma operators --- test/ostream-test.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/ostream-test.cc b/test/ostream-test.cc index 7f4479d9..71bd6f8a 100644 --- a/test/ostream-test.cc +++ b/test/ostream-test.cc @@ -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 void operator,(type_with_comma_op, const T&); +template type_with_comma_op operator<<(T&, const Date&); + enum TestEnum {}; static std::ostream& operator<<(std::ostream& os, TestEnum) { return os << "TestEnum";