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