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])