最終更新:2020-12-09 (水) 13:13:01 (1228d)
std::istreambuf_iterator
Top / std::istreambuf_iterator
https://cpprefjp.github.io/reference/iterator/istreambuf_iterator.html
コンストラクタ
bytes.assign( std::istreambuf_iterator<char>(in >> std::noskipws), std::istreambuf_iterator<char>());
- It means it's initialized to be the end-of-stream iterator.
- istream_iterator? has a special state end of stream iterator which is acquired when the end of the stream is reached or when an input operation fails.
- The end of stream iterator is returned by the default constructor.
- https://www.geeksforgeeks.org/stdistream_iterator-stdostream_iterator-c-stl/#:~:text=istream_iterator has a special state,returned by the default constructor.
- デフォルトコンストラクタで構築されたistream_iteratorオブジェクトは、イテレータの終端値として使用できる。