Skip to content

Commit fc61592

Browse files
authored
Provide PCG32::result_type
Provide result_type member type in PCG32, which makes it compatible with C++ UniformRandomBitGenerator and, as result, makes it usable in std::shuffle (which deprecated std::random_shuffle calls in Spring should be replaced with).
1 parent 8c0104a commit fc61592

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rts/System/GlobalRNG.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ struct PCG32 {
4646
typedef uint32_t res_type;
4747
typedef uint64_t val_type;
4848

49+
using result_type = res_type;
50+
4951
PCG32(const val_type _val = def_val, const val_type _seq = def_seq) { seed(_val, _seq); }
5052
PCG32(const PCG32& rng) { *this = rng; }
5153

0 commit comments

Comments
 (0)