File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -544,7 +544,7 @@ class BlockingConcurrentQueue
544544 // Returns true if the underlying atomic variables used by
545545 // the queue are lock-free (they should be on most platforms).
546546 // Thread-safe.
547- static bool is_lock_free ()
547+ static constexpr bool is_lock_free ()
548548 {
549549 return ConcurrentQueue::is_lock_free ();
550550 }
Original file line number Diff line number Diff line change @@ -1314,7 +1314,7 @@ class ConcurrentQueue
13141314 // Returns true if the underlying atomic variables used by
13151315 // the queue are lock-free (they should be on most platforms).
13161316 // Thread-safe.
1317- static bool is_lock_free ()
1317+ static constexpr bool is_lock_free ()
13181318 {
13191319 return
13201320 details::static_is_lock_free<bool >::value == 2 &&
Original file line number Diff line number Diff line change @@ -3643,9 +3643,9 @@ class ConcurrentQueueTests : public TestClass<ConcurrentQueueTests>
36433643
36443644 // is_lock_free()
36453645 {
3646- bool lockFree = ConcurrentQueue<Foo, Traits>::is_lock_free ();
3646+ constexpr bool lockFree = ConcurrentQueue<Foo, Traits>::is_lock_free ();
36473647#if defined(__amd64__) || defined(_M_X64) || defined(__x86_64__) || defined(_M_IX86) || defined(__i386__) || defined(_M_PPC) || defined(__powerpc__)
3648- ASSERT_OR_FAIL (lockFree);
3648+ static_assert (lockFree, " is_lock_free should be true " );
36493649#else
36503650 (void )lockFree;
36513651#endif
You can’t perform that action at this time.
0 commit comments