Tech Off Post

Single Post Permalink

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

    Oh, thank you! I wasn't sure how to name various things, please let me know if anything else should be cleaner.

    By the way, you were missing the last template parameter in the operator with the print_container_helper argument. I'll update my modified code (and add an example of custom delimiters), but I wanted to let you know.

    I'd also like to use some template aliases for char- and wchar_t delimiter classes a la "template<typename T> using sdelims = delimiters<T, char>. Shame my GCC4.4 doesn't seem to understand.

    Finally, I want to get a generic outputter for std::tuple, too, like we have for pair; now trying to work through variadic templates...

    Edit: I just added a C array wrapper, check out my updated code on SO!