I like your idea to support separately tracked indentation levels.
Re:Pprint: Pretty Printer for Modern C++
by calebzulawski on Monday April 29, 2019 @06:01PM
(#19783004)
Thanks! It really makes writing printers very easy.
In some ways they are similar, though I felt it was valuable to avoid using ostreams at all, and store indentation levels separately from the printed string. Additionally, I think reflection macros are especially helpful for creating printers for user-defined types.