Is there a way to ignore characters in C++ inline?
For example in this answer I'm reading in:
istringstream foo("2000-13-30");
foo >> year;
foo.ignore();
foo >> month;
foo.ignore();
foo >> day;
But I'd like to be able to do this all inline:
foo >> year >> ignore() >> month >> ignore() >> day;
I thought this was possible in C++, but it definitely isn't compiling for me. Perhaps I'm remembering another language?