Namespaces
Variants

std::uniform_int_distribution<IntType>:: uniform_int_distribution

From cppreference.net
uniform_int_distribution ( ) : uniform_int_distribution ( 0 ) { }
(1) (自 C++11 起)
explicit uniform_int_distribution ( IntType a,
IntType b = std:: numeric_limits < IntType > :: max ( ) ) ;
(2) (自 C++11 起)
explicit uniform_int_distribution ( const param_type & params ) ;
(3) (自 C++11 起)

构造新的分布对象。

2) 使用 a b 作为分布参数。
3) 使用 params 作为分布参数。

如果 a > b ,则行为未定义。

参数

a - a 分布参数(最小值)
b - b 分布参数(最大值)
params - 分布参数集合

缺陷报告

下列行为变更缺陷报告被追溯应用于先前发布的C++标准。

缺陷报告 适用范围 发布时的行为 正确行为
P0935R0 C++11 默认构造函数为显式 改为隐式