Commit aa517bd9 authored by Brian Pickrell's avatar Brian Pickrell
Browse files

comment

parent 333ce7d0
...@@ -96,9 +96,9 @@ struct random_uniform ...@@ -96,9 +96,9 @@ struct random_uniform
using type = typename decltype(output)::value_type; using type = typename decltype(output)::value_type;
if constexpr(std::is_integral<type>{}) if constexpr(std::is_integral<type>{})
{ {
// default range for all integer types is (0, INT_MAX) which depends // default range for all integer types is (0,
// on the integral type. To clamp // std::uniform_int_distribution<type>::max()).
// to a different range, apply min or max ops. to the output of this. // To clamp to a different range, apply min or max ops. to the output of this.
std::uniform_int_distribution<type> dis; std::uniform_int_distribution<type> dis;
std::generate(output.begin(), output.end(), [&] { return dis(gen); }); std::generate(output.begin(), output.end(), [&] { return dis(gen); });
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment