[RFC] Shall we provide 3 overloads for istream::ignore?
Paolo Carlini
pcarlini@suse.de
Fri May 28 11:46:00 GMT 2004
Hi,
according to 27.6.1.3, p24, the signature of istream::ignore is:
ignore(streamsize n = 1, int_type delim = traits::eof()) [1]
As often happens when defaults are involved, in this case too, providing,
additionally to
ignore(streamsize n, int_type delim) [2]
the overloads
ignore(streamsize n) [3]
and
ignore() [4]
should lead to much improved performance: [4] would be obviously trivial,
no loop involved; [3] may take into account that delim is traits::eof(),
and then no delim at all would be searched in the buffer.
Therefore, may question: is there anything wrong with providing those
overloads? What about the ABI? Is it completely safe providing [2], [3] and
[4] instead of simply [1]?
Thanks,
Paolo.
More information about the Libstdc++
mailing list