Only create random::generator from random::device
This commit is contained in:
parent
0c45409dfe
commit
684cfe92b9
1 changed files with 8 additions and 2 deletions
|
|
@ -3,6 +3,8 @@
|
|||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
#include <psemek/random/device.hpp>
|
||||
|
||||
namespace psemek::random
|
||||
{
|
||||
|
||||
|
|
@ -17,8 +19,12 @@ namespace psemek::random
|
|||
, inc_{inc}
|
||||
{}
|
||||
|
||||
template <typename RD>
|
||||
generator(RD && rd)
|
||||
generator(device & rd)
|
||||
: state_{gen64(rd)}
|
||||
, inc_{gen64(rd)}
|
||||
{}
|
||||
|
||||
generator(device && rd)
|
||||
: state_{gen64(rd)}
|
||||
, inc_{gen64(rd)}
|
||||
{}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue