File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 30
30
# define TEST_ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
31
31
# define TEST_ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
32
32
# define TEST_ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
33
- #elif TEST_COMPILER_MSVC
33
+ #elif defined( TEST_COMPILER_MSVC)
34
34
// This is lifted from STL/stl/inc/atomic on github for the purposes of
35
35
// keeping the tests compiling for MSVC's STL. It's not a perfect solution
36
36
// but at least the tests will keep running.
37
37
//
38
38
// Note MSVC's STL never produces a type that is sometimes lock free, but not always lock free.
39
39
template <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 ;
42
42
}
43
43
# define TEST_ATOMIC_CHAR_LOCK_FREE ::msvc_is_lock_free_macro_value<char >()
44
44
# 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