You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for random containers has been added in a recent 1.4.0 release
Resulting container elements type is automatically deducted from type of a two first arguments
Any container including standard STL containers with at least "begin", "end" and "insert" (nor for arrays) methods are valid
Usage examples:
auto vec = Random::get<std::vector>(1, 9, 5); // decltype(vec) is std::vector<int> with size = 5
// Note: "reserve" method invokes automatically for performance
auto mset = Random::get<std::multiset>(1.0, 9.9, 10); // decltype(mset) is std::multiset<double> with size = 10
auto arr = Random::get<std::array, 5>('0', '9'); // decltype(arr) is std::array<char, 5>
// Warning: Returning arrays with large size could be ineficcient
Currently, it is possible to generate a vector with a loop but it could be great to have a method to "quickly" generates an vector.
It could be:
Thanks for your library
The text was updated successfully, but these errors were encountered: