operator<<,>> (std::discrete_distribution)
| Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Data-parallel types (SIMD) (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Numeric array (
valarray
)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bit manipulation (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Saturation arithmetic (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Generation | ||||
| Characteristics | ||||
| Non-member functions | ||||
|
(C++11)
(C++11)
(until C++20)
|
||||
|
operator<<
operator>>
(C++11)
(C++11)
|
|
template
<
class
CharT,
class
Traits
>
friend
std::
basic_ostream
<
CharT,Traits
>
&
|
(1) | (自 C++11 起) |
|
template
<
class
CharT,
class
Traits
>
friend
std::
basic_istream
<
CharT,Traits
>
&
|
(2) | (自 C++11 起) |
对伪随机数分布 d 执行流输入和输出操作。
CharT
和
Traits
模板参数的流写入的,否则行为未定义。若遇到错误输入,将调用
ist.
setstate
(
std
::
ios
::
failbit
)
,可能抛出
std::ios_base::failure
。在此情况下
d
保持不变。
这些函数模板对普通的 非限定查找 或 限定查找 不可见,仅当 std::discrete_distribution<ResultType> 作为参数的关联类时,才能通过 实参依赖查找 被发现。
目录 |
参数
| ost | - | 用于插入数据的输出流 |
| ist | - | 用于提取数据的输入流 |
| d | - | 伪随机数分布 |
返回值
异常
缺陷报告
以下行为变更缺陷报告被追溯应用于先前发布的C++标准。
| 缺陷报告 | 适用范围 | 发布时行为 | 正确行为 |
|---|---|---|---|
| LWG 3519 | C++11 |
插入和提取运算符的形式未作规定
(可能是隐藏友元或类外函数模板) |
规定为隐藏友元 |