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]
1
#
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 neither
int
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
]