From: Christopher Dykes Date: Fri, 1 Jul 2016 05:01:48 +0000 (-0700) Subject: ConstantRNG should implement UniformRandomBitGenerator X-Git-Tag: 2016.07.26~91 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ca33aa316c3e90f68b52a79188ca6da508b5b51b;p=folly.git ConstantRNG should implement UniformRandomBitGenerator Summary: As per http://en.cppreference.com/w/cpp/concept/UniformRandomBitGenerator it was almost there, except that `min()` and `max()` need to be static members. Reviewed By: yfeldblum Differential Revision: D3507595 fbshipit-source-id: 5e0b321c477e37ab8a3487ad643caa83cc6cfc9d --- diff --git a/folly/test/RandomTest.cpp b/folly/test/RandomTest.cpp index 69447872..984b3593 100644 --- a/folly/test/RandomTest.cpp +++ b/folly/test/RandomTest.cpp @@ -55,10 +55,10 @@ TEST(Random, FixedSeed) { return 4; // chosen by fair dice roll. // guaranteed to be random. } - result_type min() { + static result_type min() { return std::numeric_limits::min(); } - result_type max() { + static result_type max() { return std::numeric_limits::max(); } };