Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- namespace foo
- {
- struct bar
- {
- enum Type { x = 'x', y = 'y' };
- };
- template<typename T> std::ostream& operator<<(std::ostream& s, typename T::Type o) { return s << char(o); }
- }
- int main()
- {
- foo::bar::Type t{ foo::bar::x };
- std::cout << t;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement