Namespaces
Variants

std::istreambuf_iterator<CharT,Traits>:: istreambuf_iterator

From cppreference.net
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
(C++20)
(C++20)
Utilities
(C++20)
Iterator adaptors
Range access
(C++11) (C++14)
(C++14) (C++14)
(C++11) (C++14)
(C++14) (C++14)
(C++17) (C++20)
(C++17)
(C++17)
(1)
istreambuf_iterator ( ) throw ( ) ;
(C++11 前)
constexpr istreambuf_iterator ( ) noexcept ;
(C++11 起)
constexpr istreambuf_iterator ( std:: default_sentinel_t ) noexcept ;
(2) (C++20 起)
(3)
istreambuf_iterator ( std:: basic_istream < CharT,Traits > & is ) throw ( ) ;
(C++11 前)
istreambuf_iterator ( std:: basic_istream < CharT,Traits > & is ) noexcept ;
(C++11 起)
(4)
istreambuf_iterator ( std:: basic_streambuf < CharT,Traits > * s ) throw ( ) ;
(C++11 前)
istreambuf_iterator ( std:: basic_streambuf < CharT,Traits > * s ) noexcept ;
(C++11 起)
(5)
istreambuf_iterator ( const /* proxy */ & p ) throw ( ) ;
(C++11 前)
istreambuf_iterator ( const /* proxy */ & p ) noexcept ;
(C++11 起)
istreambuf_iterator ( const istreambuf_iterator & ) noexcept = default ;
(6) (C++11 起)
1,2) 构造一个流结束迭代器。
3) 初始化迭代器并将 is. rdbuf ( ) 的值存储在数据成员中。如果 is. rdbuf ( ) 为空指针,则构造流结束迭代器。
4) 初始化迭代器并将 s 的值存储于数据成员中。若 s 为空指针,则构造流结束迭代器。
5) 有效地调用 (3) ,使用 streambuf_type* 指针 p 所持有的对象。
6) 复制构造函数是平凡且显式默认的。

复制构造函数实际上是被隐式声明的,且不保证是平凡的。

(C++11 前)

参数

is - 用于获取流缓冲区的输入流
s - 用于初始化迭代器的流缓冲区
p - 实现定义的代理类型的对象