Commit 6d893c13 authored by Philip Trettner's avatar Philip Trettner
Browse files

allow uniform from rvalue container

parent 72d19987
......@@ -218,7 +218,7 @@ template <class Rng, class T>
template <class Rng, class Container>
[[nodiscard]] constexpr auto uniform(Rng& rng, Container& c) -> decltype(c[c.size()])
[[nodiscard]] constexpr auto uniform(Rng& rng, Container&& c) -> decltype(c[c.size()])
TG_CONTRACT(c.size() > 0 && "cannot pick from an empty container");
return c[uniform(rng, u64(0), u64(c.size() - 1))];
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