operator==,!= (std::independent_bits_engine)
From cppreference.net
<
cpp
|
numeric
|
random
|
independent bits engine
C++
Numerics library
| 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pseudo-random number generation
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::independent_bits_engine
| Member functions | ||||
| Generation | ||||
| Characteristics | ||||
| Non-member functions | ||||
|
operator==
operator!=
(C++11)
(C++11)
(until C++20)
|
||||
|
(C++11)
(C++11)
|
|
friend
bool
operator
==
(
const
independent_bits_engine
&
lhs,
const independent_bits_engine & rhs ) ; |
(1) | (C++11 起) |
|
friend
bool
operator
!
=
(
const
independent_bits_engine
&
lhs,
const independent_bits_engine & rhs ) ; |
(2) |
(C++11 起)
(C++20 前) |
比较两个伪随机数引擎适配器。若两个引擎适配器的底层引擎相等且内部状态(若存在)相等,则视为相等,即它们对任意次数的 operator ( ) 调用都会生成等价的数值序列。
这些函数对普通的 非限定查找 或 限定查找 不可见,仅当 std::independent_bits_engine<Engine, w, UIntType> 作为参数的关联类时,才能通过 实参依赖查找 找到。
|
|
(since C++20) |
目录 |
参数
| lhs, rhs | - | 用于比较的引擎适配器 |
返回值
1)
true
若引擎适配器等效,
false
否则。
2)
true
表示引擎适配器不相等,
false
表示其他情况。
异常
不抛出任何异常。
缺陷报告
以下行为变更缺陷报告被追溯应用于先前发布的C++标准。
| 缺陷报告 | 适用标准 | 发布时行为 | 正确行为 |
|---|---|---|---|
| LWG 3519 | C++11 | 相等运算符的形式未作规定 | 规定为隐藏友元 |