After constructing a
sentry
object, if the sentry converts to
true, calls
str.erase()
and then extracts characters from
is and appends them
to
str as if by calling
str.append(1, c)
until any of the following occurs:
- end-of-file occurs on the input sequence
(in which case, the
getline
function calls
is.setstate(​ios_Âbase​::​eofbit)).
- traits​::​eq(c, delim)
for the next available input character
c
(in which case,
c
is extracted but not appended) ([iostate.flags])
- str.max_Âsize()
characters are stored
(in which case,
the function calls
is.setstate(ios_Âbase​::​failbit)) ([iostate.flags])