operator==,!=(std::negative_binomial_distribution)
來自 cppreference.com
friend bool operator==( const negative_binomial_distribution& lhs, const negative_binomial_distribution& rhs ); |
(1) | (C++11 起) |
friend bool operator!=( const negative_binomial_distribution& lhs, const negative_binomial_distribution& rhs ); |
(2) | (C++11 起) (C++20 前) |
比較兩個分佈物件。當引數值和內部狀態相同時,兩個分佈物件相等。
1) 比較兩個分佈物件是否相等。
2) 比較兩個分佈物件是否不相等。
這些函式對普通非限定或限定查詢不可見,只能透過實參依賴查詢在 std::negative_binomial_distribution<ResultType> 為實參的關聯類時找到。
|
(C++20 起) |
目錄 |
[編輯] 引數
lhs, rhs | - | 要比較的分佈物件 |
[編輯] 返回值
1) 如果分佈物件相等則為 true,否則為 false。
2) 如果分佈物件不相等則為 true,否則為 false。
[編輯] 複雜度
常數時間。
[編輯] 缺陷報告
下列更改行為的缺陷報告追溯地應用於以前出版的 C++ 標準。
缺陷報告 | 應用於 | 釋出時的行為 | 正確的行為 |
---|---|---|---|
LWG 3519 | C++11 | 相等運算子的形式未指定 (可以是隱藏友元或自由函式模板) |
指定為隱藏友元 |