Skip to content

Commit 2caa47b

Browse files
committed
include/random: use std::optional instead of boost::optional
`boost::optional` is obsolete since C++17. Signed-off-by: Max Kellermann <[email protected]>
1 parent 99f58a5 commit 2caa47b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/include/random.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#define CEPH_RANDOM_H 1
1717

1818
#include <mutex>
19+
#include <optional>
1920
#include <random>
2021
#include <type_traits>
21-
#include <boost/optional.hpp>
2222

2323
// Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85494
2424
#ifdef __MINGW32__
@@ -123,7 +123,7 @@ void randomize_rng()
123123
template <typename EngineT>
124124
EngineT& engine()
125125
{
126-
thread_local boost::optional<EngineT> rng_engine;
126+
thread_local std::optional<EngineT> rng_engine;
127127

128128
if (!rng_engine) {
129129
rng_engine.emplace(EngineT());

0 commit comments

Comments
 (0)