operator==,!=(std::geometric_distribution)
来自cppreference.com
                    
                                        
                    < cpp | numeric | random | geometric distribution
                    
                                                            
                    
|   friend bool operator==( const geometric_distribution& lhs, const geometric_distribution& rhs );  | 
(1) | (C++11 起) | 
|   friend bool operator!=( const geometric_distribution& lhs, const geometric_distribution& rhs );  | 
(2) |  (C++11 起)  (C++20 前)  | 
比较二个分布对象。参数值和内部状态相同时二个分布对象相等。
1) 比较二个分布对象是否相等。
2) 比较二个分布对象是否不等。
这些函数对通常无限定或有限定查找不可见,而只能在 std::geometric_distribution<ResultType> 为参数的关联类时由实参依赖查找找到。
| 
 
  | 
(C++20 起) | 
参数
| lhs, rhs | - | 要比较的分布对象 | 
返回值
1) 若分布对象相等则为 true ,否则为 false 。
2) 若分布对象不相等则为 true ,否则为 false 。
复杂度
常数。
缺陷报告
下列更改行为的缺陷报告追溯地应用于以前出版的 C++ 标准。
| 缺陷报告 | 应用于 | 出版时的行为 | 正确行为 | 
|---|---|---|---|
| LWG 3519 | C++11 | 相等运算符的形式未指定 | 指定为隐藏友元 |