Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. namespace foo
  4. {
  5. struct bar
  6. {
  7. enum Type { x = 'x', y = 'y' };
  8. };
  9. template<typename T> std::ostream& operator<<(std::ostream& s, typename T::Type o) { return s << char(o); }
  10. }
  11.  
  12. int main()
  13. {
  14. foo::bar::Type t{ foo::bar::x };
  15. std::cout << t;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement