Commit 99ffa6b4 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Make random number generator code compile with clang++-15 + libc++-15.

A uniform random bit generator G needs to have a typedef for G::result_type.
See issue #29.
Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent eced66fc
......@@ -49,7 +49,9 @@ public:
Random (uint64_t seed, Stream stream);
~Random();
uint64_t
typedef uint64_t result_type;
result_type
operator()()
{
if (buffer_pos == buffer.size())
......@@ -57,12 +59,12 @@ public:
return buffer[buffer_pos++];
}
static constexpr uint64_t
static constexpr result_type
min()
{
return 0;
}
static constexpr uint64_t
static constexpr result_type
max()
{
return UINT64_MAX;
......
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