T
thijs
Can someone motivate the design choice that led to random distributions having their parameters stored in the param_type sub class?
E.g. the uniform integer distribution has two parameter a and b that specify the bounds.
uniform_int_distribution<> dice(1,6);
dice.a(); // gives a
dice.b(); // gives b
However, all distributions also have a param() member funtion and a nested class param_type that captures all the distribution parameters.
dice.param().a() // give also a
dice.param().b() // give also b
Why has it been decided to move the parameters of the distribution to a nested class param_type?? Why not simply store them in the distribution class directly?
E.g. the uniform integer distribution has two parameter a and b that specify the bounds.
uniform_int_distribution<> dice(1,6);
dice.a(); // gives a
dice.b(); // gives b
However, all distributions also have a param() member funtion and a nested class param_type that captures all the distribution parameters.
dice.param().a() // give also a
dice.param().b() // give also b
Why has it been decided to move the parameters of the distribution to a nested class param_type?? Why not simply store them in the distribution class directly?