Effects:
Behaves as an
unformatted input function,
except that it does not affect the value returned by subsequent calls to
basic_istream<>::gcount(). 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])