std::unifor...distribution(3)
π std::uniform_int_distribution::uniform_int_distribution π
okay bestie, welcome to the C++ Standard Libary manual page for std::uniform_int_distribution::uniform_int_distribution β you may also spot the tag std::unifor...distribution(3) chilling at the top, because the terminal had to truncate it π. we're gonna keep every detail and still make it cute. periodt.
πΈ NAME πΈ
std::uniform_int_distribution::uniform_int_distributionβstd::uniform_int_distribution::uniform_int_distribution(yes, it's the same mouthful twice, and it's iconic π )
π¦ Synopsis π¦
uniform_int_distribution() : uniform_int_distribution(0) { }
explicit uniform_int_distribution( IntType a,
IntType b =
std::numeric_limits<IntType>::max() );
explicit uniform_int_distribution( const param_type& params );
- (1) (since C++11) β the no-argument constructor.
- (2) (since C++11) β the
a/bconstructor, wherebdefaults tostd::numeric_limits<IntType>::max(). - (3) (since C++11) β the
paramsconstructor.
this constructor constructs new distribution object β¨
- (2) uses
aandbas the distribution parameters. - (3) uses
paramsas the distribution parameters.
β οΈ the behavior is undefined if a > b β οΈ β fr fr, not a cute look, do not pass a bigger minimum than maximum π
π Parameters π
aβ theadistribution parameter (minimum value)bβ thebdistribution parameter (maximum value)paramsβ the distribution parameter set
π Defect reports π
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR:
P0935R0β Applied to: C++11; Behavior as published: default constructor wasexplicit; Correct behavior: madeimplicit.
okay bye bestie π«Ά source is http://cppreference.com, version/date is 2024.06.10, and the manual tag is std::unifor...distribution(3) β slay and read safely π
β¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms