File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3030# define TEST_ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
3131# define TEST_ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
3232# define TEST_ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
33- #elif TEST_COMPILER_MSVC
33+ #elif defined( TEST_COMPILER_MSVC)
3434// This is lifted from STL/stl/inc/atomic on github for the purposes of
3535// keeping the tests compiling for MSVC's STL. It's not a perfect solution
3636// but at least the tests will keep running.
3737//
3838// Note MSVC's STL never produces a type that is sometimes lock free, but not always lock free.
3939template <class T , size_t Size = sizeof (T)>
40- constexpr bool msvc_is_lock_free_macro_value () {
41- return (Size <= 8 && (Size & Size - 1 ) == 0 ) ? 2 : 0 ;
40+ constexpr int msvc_is_lock_free_macro_value () {
41+ return (Size <= 8 && (Size & ( Size - 1 ) ) == 0 ) ? 2 : 0 ;
4242}
4343# define TEST_ATOMIC_CHAR_LOCK_FREE ::msvc_is_lock_free_macro_value<char >()
4444# define TEST_ATOMIC_SHORT_LOCK_FREE ::msvc_is_lock_free_macro_value<short >()
You can’t perform that action at this time.
0 commit comments