1.1 KiB
1.1 KiB
[diff.cpp23.io]
Annex C (informative) Compatibility [diff]
C.1 C++ and ISO C++ 2023 [diff.cpp23]
C.1.10 [input.output]: input/output library [diff.cpp23.io]
Affected subclause: [istream.unformatted]
Change: Overloaded std::basic_istream<char, traits>::ignore.
Rationale: Allow char values to be used as delimiters.
Effect on original feature: Calls to istream::ignore with a second argument of char type can change behavior.
Calls to istream::ignore with a second argument that is neitherint nor char type can become ill-formed.
[Example 1: std::istringstream in("\xF0\x9F\xA4\xA1 Clown Face"); in.ignore(100, '\xA1'); // ignore up to '\xA1' delimiter,// previously might have ignored to EOF in.ignore(100, -1L); // ambiguous overload,// previously equivalent to (int)-1L â end example]