std::istream_iterator是一种单趟输入迭代器,通过调用适当的operator>>,从为之创建迭代器的std::basic_istream对象读取T类型的相继对象。实际读取操作在自增,而非解引用迭代器时进行。在构造迭代器时读取首个对象。解引用只返回最近读取的对象的副本。
istream_iterator(constistream_iterator&other)=default; (since C++11) 1,2)Constructs the end-of-stream iterator, value-initializes the stored value. This constructor is constexpr if the initializer in the definitionautox=T();is a constant initializer(since C++11). ...
The default-constructedstd::istreambuf_iteratoris known as theend-of-streamiterator. When astd::istreambuf_iteratorreaches the end of the underlying stream, it becomes equal to the end-of-stream iterator. Dereferencing or incrementing it further invokes undefined behavior. ...
然而,模板形参可以另行推导,如std::vector<int>v(std::istream_iterator<int>(std::cin),{})的情况,其中迭代器类型从首个实参推导,但也被用于第二形参位置。对于使用关键词auto的类型推导中有一个例外,在复制列表初始化中将任何花括号包围的初始化器列表均推导为std::initializer_list。
Iteratory Biblioteka operacji numerycznych Funkcje matematyczne Liczby zespolone Generatory pseudolosowe Operacje wejścia/wyjścia basic_streambuf basic_filebuf basic_stringbuf ios_base basic_ios basic_istream basic_ostream basic_iostream
Libreria di iteratori Libreria matematica Funzioni matematiche comuni Numeri complessi Generazione numeri pseudo-casuali Libreria di input/output basic_streambuf basic_filebuf basic_stringbuf ios_base basic_ios basic_istream basic_ostream basic_iostream ...
Iterator-Bibliothek Numerik-Bibliothek Grundlegende mathematische Funktionen Komplexe Zahlen Pseudozufallszahlen Eingabe/ Ausgabe-Bibliothek basic_streambuf basic_filebuf basic_stringbuf ios_base basic_ios basic_istream basic_ostream basic_iostream
istream.md iterator.md latch.md limits.md linalg.md list.md locale.md map.md mdspan.md memory.md memory_resource.md mutex.md new.md node_handle.md numbers.md numeric.md optional.md ostream.md print.md queue.md random.md ranges.md ratio.md regex.md scoped_allocator.md semaphore....
C++ Library - <iterator> 0 - This is a modal window. No compatible source was found for this media. referencexreferencereferencexreference&flip();booloperator~()const;} C++11 classbitset::reference{friendclassbitset;reference()noexcept;/* Private constructor */public:~reference();operatorbool()...