operator==,!=(std::subtract_with_carry_engine)
來自 cppreference.com
< cpp | numeric | random | subtract with carry engine
friend bool operator==( const subtract_with_carry_engine& lhs, const subtract_with_carry_engine& rhs ); |
(1) | (C++11 起) |
friend bool operator!=( const subtract_with_carry_engine& lhs, const subtract_with_carry_engine& rhs ); |
(2) | (C++11 起) (C++20 前) |
比較兩個偽隨機數引擎。如果兩個引擎的內部狀態等價,則它們相等,即,如果它們在任意次數的 operator() 呼叫中生成等價的值。
這些函式對普通的非限定或限定查詢不可見,並且只能透過實參依賴查詢在 std::subtract_with_carry_engine<UIntType, w, s, r> 是實參的關聯類時找到。
|
(C++20 起) |
[編輯] 引數
lhs, rhs | - | 要比較的引擎 |
[編輯] 返回值
1) 如果引擎相等則為 true,否則為 false。
2) 如果引擎不相等則為 true,否則為 false。
[編輯] 缺陷報告
下列更改行為的缺陷報告追溯地應用於以前出版的 C++ 標準。
缺陷報告 | 應用於 | 釋出時的行為 | 正確的行為 |
---|---|---|---|
LWG 3519 | C++11 | 相等運算子的形式未指定 | 指定為隱藏友元 |