Tech Off Post

Single Post Permalink

View Thread: Templated STL container pretty printer
  • User profile image
    KerrekSB

    Sure, if you find a situation were this breaks stuff, we should try to think about it, but for now I'm finding this tremendously useful.

    The only problem I can see is if you try to directly stream-out an object of a class for which you haven't defined an operator and which have iterators -- if you did have an overloaded operator, it would take precedence, and if you didn't and don't want it to be used like this, then you shouldn't write "cout << x". So... I really can't think of a way in which our templates would break an existing program. Please do tell if you have an example!