]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
random: revert change from boost::optional to std::optional 21567/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 20 Apr 2018 15:47:37 +0000 (11:47 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 20 Apr 2018 16:24:06 +0000 (12:24 -0400)
somehow this was breaking the seeding of thread-local engines on gcc.
we'll have to investigate this further, but for now i'm reverting this
piece to get messengers working again

Fixes: http://tracker.ceph.com/issues/23778
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/include/random.h

index 63593e8e601a7f0bc272c5ecd9c20b8df06e467b..cbfee2d7235b16541b10caf0b9ba0d3d179901a5 100644 (file)
@@ -17,8 +17,8 @@
 
 #include <mutex>
 #include <random>
-#include <optional>
 #include <type_traits>
+#include <boost/optional.hpp>
 
 // Basic random number facility, adapted from N3551:
 namespace ceph::util {
@@ -114,7 +114,7 @@ void randomize_rng()
 template <typename EngineT>
 EngineT& engine()
 {
-  thread_local std::optional<EngineT> rng_engine;
+  thread_local boost::optional<EngineT> rng_engine;
 
   if (!rng_engine) {
     rng_engine.emplace(EngineT());