diff --git a/random.hpp b/random.hpp index c6a4e367..f9c4aece 100644 --- a/random.hpp +++ b/random.hpp @@ -211,7 +211,7 @@ namespace cruft::random { // /// \return An iterator to the chosen value. template - typename ContainerT::iterator + decltype(auto) choose (ContainerT &data, GeneratorT &&gen) { if (data.empty ()) @@ -235,7 +235,7 @@ namespace cruft::random { /// /// \return An iterator to the chosen value. template - typename ContainerT::iterator + decltype(auto) choose (ContainerT &data) { return choose (data, generator ());