diff --git a/test/cxxtest/general.h b/test/cxxtest/general.h index a680da5..caa5414 100644 --- a/test/cxxtest/general.h +++ b/test/cxxtest/general.h @@ -1,3 +1,4 @@ +#include #include #include #include @@ -125,6 +126,17 @@ static_assert_1(*Channel::_values().begin() == +Channel::Red); static_assert_1(*(Channel::_values().end() - 1) == +Channel::Blue); static_assert_1(Channel::_values()[1] == +Channel::Green); +namespace name_clash_test { + +struct Foo {}; +std::ostream& operator<<(std::ostream&, Foo); + +BETTER_ENUM(Enum, int, ONE, TWO, THREE) + +static_assert_1((std::is_same() << +Enum::ONE), std::ostream&>())); + +} + #ifdef BETTER_ENUMS_CONSTEXPR_TO_STRING constexpr bool same_string(const char *r, const char *s, size_t index = 0)