Make OpenSSLGenerator max() and min() constexpr
The latest version of gcc seems to be enforcing that these are static
and constexpr, presumably because std::random_device is now using them
in a constexpr context. It seems odd this would be required (you'd
think it would be breaking backward compatibility) but it's an easy
enough change to make.
Tested:
Only tested that code builds. Not tested functionally.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3f5e7077d56178fbc7b4e02f4e2f4a357c928c5b
diff --git a/include/random.hpp b/include/random.hpp
index d11c249..0e63391 100644
--- a/include/random.hpp
+++ b/include/random.hpp
@@ -20,11 +20,11 @@
return index;
}
- uint8_t max()
+ static constexpr uint8_t max()
{
return std::numeric_limits<uint8_t>::max();
}
- uint8_t min()
+ static constexpr uint8_t min()
{
return std::numeric_limits<uint8_t>::min();
}