
18 Feb
2013
18 Feb
'13
11:33 p.m.
Hi Nathan,
you mean pass a boolean into operator*?
Surely not, as the signature of an overloaded operator is fixed :)
I think Phil means rather than do the read in operator++, just set a flag in operator++ that the read should be done, and actually do it in operator* (which then clears the flag). Then if someone calls operator++ again without calling operator* (which you can detect by the flag being set in operator++), you can do a skip in operator++, and thus avoid decoding the line you didn't need.
Interesting idea. I'll update the code. Christian