Skip to content

Commit 145d45a

Browse files
committed
Fixup for cxx03
Work around `error: unknown type name 'constexpr'`. Not sure that is the right approach since `<atomic>` is C++11...
1 parent 95a84d4 commit 145d45a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libcxx/test/std/atomics/types.pass.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ void test() {
8080
#if TEST_STD_VER >= 17
8181
static_assert((std::is_same_v<typename A::value_type, T>), "");
8282
#endif
83-
constexpr bool IntegralOrFloating =
84-
(std::is_integral<T>::value && !std::is_same<T, bool>::value) || std::is_floating_point<T>::value;
85-
constexpr bool Pointer = std::is_pointer<T>::value;
83+
enum {
84+
IntegralOrFloating =
85+
(std::is_integral<T>::value && !std::is_same<T, bool>::value) || std::is_floating_point<T>::value
86+
};
87+
enum { Pointer = std::is_pointer<T>::value };
8688
test_atomic<A, IntegralOrFloating, Pointer>();
8789
}
8890

0 commit comments

Comments
 (0)