Hi,
A fellow user on an online forum that I frequent asked about the use of C++ input streams to replace the use of scanf() and family where the format string included constant portions, e.g., the "a=" in "a=%d". The answer was to read the input as a string and then parse it. Another user chimed in to say that he preferred sscanf() for this reason, and that C++ input streams would be more useful if such constant portions could be easily matched.
I wrote a manipulator that did just that as a proof of concept, but now I wonder if Boost already provides such a manipulator, or if say, Boost.Spirit with its file_iterator is deemed as the right solution. There certainly seems to be a trade-off between these two choices: a manipulator would be a simple add-on to existing standard library functionality, but Boost.Spirit is much more powerful.
Thank you,
Eugene Wee