random: add RandomMixin::randbits with compile-known bits
In many cases, it is known at compile time how many bits are requested from randbits. Provide a variant of randbits that accepts this number as a template, to make sure the compiler can make use of this knowledge. This is used immediately in rand32() and randbool(), and a few further call sites.
This commit is contained in:
1 parent
21ce9d8658
commit
ddb7d26cfd
6 files changed
+52
-9
No files matched your search
@@ -77,3 +77,4 @@ shift-base:streams.h
|
||||
shift-base:FormatHDKeypath
|
||||
shift-base:xoroshiro128plusplus.h
|
||||
shift-base:RandomMixin<*>::randbits
|
||||
shift-base:RandomMixin<*>::randbits<*>
|
||||
Reference in new issue
Block a user