Closed borisbn closed 11 years ago
I won't merge this as it stands, as it is not usable in the same spirit as the remainder of the library because of the preprocessor macros, and it is questionable whether there is demand for this. I'm happy to explore the idea in the future, though.
I'm sertanly do not insist, but let's see what it would be if strings will contain only digits. BTW, I hate preprocessor too, but I was too lazy to think about how to do it in right way. Nevertheless, I'll fight my lazyness and try to do it in the "same spirit".
If you want you can add the quotes in the calling code, non?
I don't think, that it's a good idea to change all strings in some container, then print them, and then remove quotes...
Hm, never mind my comment. Interesting, let's earmark this. I know that STL's solution (see the linked video) is more flexible in that regard and allows you to print elements in arbitrary ways, but it comes at the price of requiring an explicit print()
function. But if that suits your needs better, please feel free to use that.
1) Added function need_qoute, that returns true if it's argument is a string (this behavior can be turned off by #define DONT_QUOTE_STRINGS before including this file). 2) Changed output for containers, pairs and tupels. Now they call need_qoute and add quotes if need