From adef7b650e973d26af78a2e795bf6edcbc00c34d Mon Sep 17 00:00:00 2001 From: "Ethan.y" <19841459135@163.com> Date: Sun, 25 Oct 2026 19:42:51 +0800 Subject: [PATCH] Remove 'static' from inline function declarations --- concurrentqueue.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/concurrentqueue.h b/concurrentqueue.h index dcde4e6e..40098441 100644 --- a/concurrentqueue.h +++ b/concurrentqueue.h @@ -479,7 +479,7 @@ namespace details }; template struct hash_32_or_64 : public _hash_32_or_64<(size > 4)> { }; - static inline size_t hash_thread_id(thread_id_t id) + inline size_t hash_thread_id(thread_id_t id) { static_assert(sizeof(thread_id_t) <= 8, "Expected a platform where thread IDs are at most 64-bit values"); #if defined(__GNUC__) && !defined(__clang__) @@ -494,7 +494,7 @@ namespace details } template - static inline bool circular_less_than(T a, T b) + inline bool circular_less_than(T a, T b) { static_assert(std::is_integral::value && !std::numeric_limits::is_signed, "circular_less_than is intended to be used only with unsigned integer types"); return static_cast(a - b) > static_cast(static_cast(1) << (static_cast(sizeof(T) * CHAR_BIT - 1))); @@ -503,14 +503,14 @@ namespace details } template - static inline char* align_for(char* ptr) + inline char* align_for(char* ptr) { const std::size_t alignment = std::alignment_of::value; return ptr + (alignment - (reinterpret_cast(ptr) % alignment)) % alignment; } template - static inline T ceil_to_pow_2(T x) + inline T ceil_to_pow_2(T x) { static_assert(std::is_integral::value && !std::numeric_limits::is_signed, "ceil_to_pow_2 is intended to be used only with unsigned integer types"); @@ -527,7 +527,7 @@ namespace details } template - static inline void swap_relaxed(std::atomic& left, std::atomic& right) + inline void swap_relaxed(std::atomic& left, std::atomic& right) { T temp = left.load(std::memory_order_relaxed); left.store(right.load(std::memory_order_relaxed), std::memory_order_relaxed); @@ -535,7 +535,7 @@ namespace details } template - static inline T const& nomove(T const& x) + inline T const& nomove(T const& x) { return x; } @@ -562,7 +562,7 @@ namespace details }; template - static inline auto deref_noexcept(It& it) MOODYCAMEL_NOEXCEPT -> decltype(*it) + inline auto deref_noexcept(It& it) MOODYCAMEL_NOEXCEPT -> decltype(*it) { return *it; }