Files
2025-10-25 03:02:53 +03:00

46 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[istream.manip]
# 31 Input/output library [[input.output]](./#input.output)
## 31.7 Formatting and manipulators [[iostream.format]](iostream.format#istream.manip)
### 31.7.5 Input streams [[input.streams]](input.streams#istream.manip)
#### 31.7.5.5 Standard basic_istream manipulators [istream.manip]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L5735)
Each instantiation of the function template
specified in this subclause
is a designated addressable function ([[namespace.std]](namespace.std "16.4.5.2.1Namespace std"))[.](#1.sentence-1)
[🔗](#lib:ws)
`template<class charT, class traits>
basic_istream<charT, traits>& ws(basic_istream<charT, traits>& is);
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L5747)
*Effects*: Behaves as an [unformatted input function](istream.unformatted "31.7.5.4Unformatted input functions[istream.unformatted]"), except that it does not count the number of characters extracted and
does not affect the value returned by subsequent calls to is.gcount()[.](#2.sentence-1)
After
constructing a sentry object extracts characters as long as the next available
character c is whitespace or until there are no more characters in the sequence[.](#2.sentence-2)
Whitespace characters are distinguished with the same criterion as used by[sentry::sentry](istream.sentry "31.7.5.2.4Class basic_­istream::sentry[istream.sentry]")[.](#2.sentence-3)
Ifws stops extracting characters because there are no more available it setseofbit,
but notfailbit[.](#2.sentence-4)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L5762)
*Returns*: is[.](#3.sentence-1)