std::istreambuf_iterator<CharT,Traits>:: istreambuf_iterator
From cppreference.net
<
cpp
|
iterator
|
istreambuf iterator
C++
Iterator library
| Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::istreambuf_iterator
| Member functions | ||||
|
istreambuf_iterator::istreambuf_iterator
|
||||
| Non-member functions | ||||
|
(until C++20)
|
| (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 | - | 实现定义的代理类型的对象 |