From ca33aa316c3e90f68b52a79188ca6da508b5b51b Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 30 Jun 2016 22:01:48 -0700 Subject: [PATCH] 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 --- folly/test/RandomTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } }; -- 2.34.1