mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
Test is_streamable with overloaded comma operators
This commit is contained in:
committed by
Victor Zverovich
parent
430e6ac9b6
commit
9a0a24f90b
@ -26,6 +26,11 @@ static std::wostream& operator<<(std::wostream& os, const Date& d) {
|
|||||||
return os;
|
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 {};
|
enum TestEnum {};
|
||||||
static std::ostream& operator<<(std::ostream& os, TestEnum) {
|
static std::ostream& operator<<(std::ostream& os, TestEnum) {
|
||||||
return os << "TestEnum";
|
return os << "TestEnum";
|
||||||
|
Reference in New Issue
Block a user