This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Shall we provide 3 overloads for istream::ignore?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]