Skip to content

Commit 1e49516

Browse files
Merge pull request ceph#61000 from MaxKellermann/no_boost
Use `std` instead of Boost
2 parents 1c08663 + 858ed42 commit 1e49516

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/common/bit_vector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class BitVector
2929
static const uint8_t MASK = static_cast<uint8_t>((1 << _bit_count) - 1);
3030

3131
// must be power of 2
32-
BOOST_STATIC_ASSERT((_bit_count != 0) && !(_bit_count & (_bit_count - 1)));
33-
BOOST_STATIC_ASSERT(_bit_count <= BITS_PER_BYTE);
32+
static_assert((_bit_count != 0) && !(_bit_count & (_bit_count - 1)));
33+
static_assert(_bit_count <= BITS_PER_BYTE);
3434

3535
template <typename DataIterator>
3636
class ReferenceImpl {

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)