summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasaBharathKanta <61141011+SrinivasaBharath@users.noreply.github.com>2025-01-13 10:28:17 +0100
committerGitHub <noreply@github.com>2025-01-13 10:28:17 +0100
commit1e4951633aa9c59d229b56981e55650f289a5404 (patch)
tree734087c85063ce65e690fe25558c3667bc68ddcf
parentMerge pull request #61278 from VallariAg/wip-vallari-nvmeof-alerts-update (diff)
parentcommon/bit_vector: use static_assert() instead of BOOST_STATIC_ASSERT() (diff)
downloadceph-1e4951633aa9c59d229b56981e55650f289a5404.tar.xz
ceph-1e4951633aa9c59d229b56981e55650f289a5404.zip
Merge pull request #61000 from MaxKellermann/no_boost
Use `std` instead of Boost
-rw-r--r--src/common/bit_vector.hpp4
-rw-r--r--src/include/random.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/bit_vector.hpp b/src/common/bit_vector.hpp
index 961d9a0192e..c5fd491ed29 100644
--- a/src/common/bit_vector.hpp
+++ b/src/common/bit_vector.hpp
@@ -29,8 +29,8 @@ private:
static const uint8_t MASK = static_cast<uint8_t>((1 << _bit_count) - 1);
// must be power of 2
- BOOST_STATIC_ASSERT((_bit_count != 0) && !(_bit_count & (_bit_count - 1)));
- BOOST_STATIC_ASSERT(_bit_count <= BITS_PER_BYTE);
+ static_assert((_bit_count != 0) && !(_bit_count & (_bit_count - 1)));
+ static_assert(_bit_count <= BITS_PER_BYTE);
template <typename DataIterator>
class ReferenceImpl {
diff --git a/src/include/random.h b/src/include/random.h
index f2e3e37bcd7..6b7c9405efd 100644
--- a/src/include/random.h
+++ b/src/include/random.h
@@ -16,9 +16,9 @@
#define CEPH_RANDOM_H 1
#include <mutex>
+#include <optional>
#include <random>
#include <type_traits>
-#include <boost/optional.hpp>
// Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85494
#ifdef __MINGW32__
@@ -123,7 +123,7 @@ void randomize_rng()
template <typename EngineT>
EngineT& engine()
{
- thread_local boost::optional<EngineT> rng_engine;
+ thread_local std::optional<EngineT> rng_engine;
if (!rng_engine) {
rng_engine.emplace(EngineT());