diff --git a/include/realtime_tools/lock_free_queue.hpp b/include/realtime_tools/lock_free_queue.hpp index 7665d047..e9491d01 100644 --- a/include/realtime_tools/lock_free_queue.hpp +++ b/include/realtime_tools/lock_free_queue.hpp @@ -305,11 +305,7 @@ class LockFreeQueueBase */ bool is_lock_free() const { - if constexpr (is_spsc_queue::value) { - return true; - } else { - return data_queue_.is_lock_free(); - } + return (is_spsc_queue::value) || data_queue_.is_lock_free(); } /**