Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: Fast Random Library for C++17.
- Faster uniform / normal distributions that produce same sequences on every platform
This is very useful if you want to reliably repeat simulations across platforms!
One question:
template<class T> constexpr T& rand_choice(std::initializer_list<T> objects) noexcept;
- Faster uniform / normal distributions that produce same sequences on every platform
This is very useful if you want to reliably repeat simulations across platforms!
One question:
Isn't this returning a reference to a local variable? In my understanding, 'objects' is destroyed when rand_choice() returns.