From 3a4927a982ada96e0b3628d210fb5bf7e5b44e29 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Tue, 27 Jun 2023 11:09:27 +0000 Subject: [PATCH] Cleanup NVCC version filtering --- .../mdspan/mdspan.extents.cons/array.pass.cpp | 4 +-- .../mdspan/mdspan.extents.cons/span.pass.cpp | 4 +-- .../iterator.range/begin-end.pass.cpp | 4 +-- .../ctor/ctor.inplace_init_list.pass.cpp | 4 +-- .../ctor/ctor.unexpect_init_list.pass.cpp | 4 +-- .../monadic/and_then.pass.cpp | 4 +-- .../monadic/or_else.pass.cpp | 4 +-- .../expected.void/monadic/and_then.pass.cpp | 4 +-- .../expected.void/monadic/or_else.pass.cpp | 4 +-- .../expected.void/monadic/transform.pass.cpp | 4 +-- .../expected.void/observers/deref.pass.cpp | 4 +-- .../expected.void/observers/value.pass.cpp | 4 +-- .../optional.comp_with_t/equal.pass.cpp | 4 +-- .../optional.comp_with_t/greater.pass.cpp | 4 +-- .../greater_equal.pass.cpp | 4 +-- .../optional.comp_with_t/less_equal.pass.cpp | 4 +-- .../optional.comp_with_t/less_than.pass.cpp | 4 +-- .../optional.comp_with_t/not_equal.pass.cpp | 4 +-- .../optional.monadic/or_else.pass.cpp | 4 +-- .../optional/optional.nullops/equal.pass.cpp | 4 +-- .../optional.nullops/greater.pass.cpp | 4 +-- .../optional.nullops/greater_equal.pass.cpp | 4 +-- .../optional.nullops/less_equal.pass.cpp | 4 +-- .../optional.nullops/less_than.pass.cpp | 4 +-- .../optional.nullops/not_equal.pass.cpp | 4 +-- .../assign_value.pass.cpp | 4 +-- .../const_optional_U.pass.cpp | 4 +-- .../optional.object.assign/copy.pass.cpp | 8 +++--- .../optional.object.assign/move.pass.cpp | 16 +++++------ .../optional.object.ctor/U.pass.cpp | 12 ++++---- .../optional.object.ctor/const_T.pass.cpp | 8 +++--- .../optional.object.ctor/copy.pass.cpp | 8 +++--- .../optional.object.ctor/default.pass.cpp | 4 +-- .../optional.object.ctor/in_place_t.pass.cpp | 8 +++--- .../initializer_list.pass.cpp | 4 +-- .../optional.object.ctor/move.pass.cpp | 8 +++--- .../optional.object.ctor/nullopt_t.pass.cpp | 4 +-- .../optional.object.ctor/rvalue_T.pass.cpp | 8 +++--- .../optional.object.observe/bool.pass.cpp | 4 +-- .../dereference.pass.cpp | 4 +-- .../dereference_const.pass.cpp | 4 +-- .../dereference_const_rvalue.pass.cpp | 4 +-- .../dereference_rvalue.pass.cpp | 4 +-- .../has_value.pass.cpp | 4 +-- .../optional.object.observe/op_arrow.pass.cpp | 4 +-- .../op_arrow_const.pass.cpp | 4 +-- .../optional.object.observe/value.pass.cpp | 4 +-- .../value_const.pass.cpp | 4 +-- .../value_const_rvalue.pass.cpp | 4 +-- .../value_or_const.pass.cpp | 4 +-- .../value_rvalue.pass.cpp | 4 +-- .../optional/optional.relops/equal.pass.cpp | 4 +-- .../optional.relops/greater_equal.pass.cpp | 4 +-- .../optional.relops/greater_than.pass.cpp | 4 +-- .../optional.relops/less_equal.pass.cpp | 4 +-- .../optional.relops/less_than.pass.cpp | 4 +-- .../optional.relops/not_equal.pass.cpp | 4 +-- .../optional.specalg/make_optional.pass.cpp | 4 +-- .../make_optional_explicit.pass.cpp | 4 +-- ...ptional_explicit_initializer_list.pass.cpp | 4 +-- .../test/support/test_macros.h | 5 ++++ .../include/cuda/std/detail/__annotated_ptr | 8 +++--- .../cuda/std/detail/libcxx/include/__config | 24 ++++++++++++---- .../libcxx/include/__expected/expected_base.h | 28 +++++++++---------- .../__mdspan/standard_layout_static_array.h | 4 +-- .../libcxx/include/__mdspan/static_array.h | 4 +-- .../cuda/std/detail/libcxx/include/bit | 16 +++++------ .../cuda/std/detail/libcxx/include/cmath | 6 ++-- .../cuda/std/detail/libcxx/include/cstdlib | 4 +-- .../cuda/std/detail/libcxx/include/optional | 18 ++++++------ libcudacxx/include/cuda/stream_ref | 8 +++--- 71 files changed, 213 insertions(+), 196 deletions(-) diff --git a/libcudacxx/.upstream-tests/test/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp b/libcudacxx/.upstream-tests/test/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp index 750e12a9b47..b094d1e11ac 100644 --- a/libcudacxx/.upstream-tests/test/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp @@ -55,7 +55,7 @@ int main(int, char**) static_assert( is_array_cons_avail_v< cuda::std::dextents< int,2>, my_int, 2 > == true , "" ); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) +#if !defined(TEST_COMPILER_NVCC_BELOW_11_3) // Constraint: rank consistency static_assert( is_array_cons_avail_v< cuda::std::dextents< int,1>, int , 2 > == false, "" ); @@ -66,7 +66,7 @@ int main(int, char**) #ifndef TEST_COMPILER_NVHPC static_assert( is_array_cons_avail_v< cuda::std::dextents< int,1>, my_int_non_nothrow_constructible, 1 > == false, "" ); #endif // TEST_COMPILER_NVHPC -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) +#endif // !defined(TEST_COMPILER_NVCC_BELOW_11_3) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp b/libcudacxx/.upstream-tests/test/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp index 049457821a3..99601e99411 100644 --- a/libcudacxx/.upstream-tests/test/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp @@ -56,7 +56,7 @@ int main(int, char**) static_assert( is_span_cons_avail_v< cuda::std::dextents, my_int, 2 > == true , "" ); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) +#if !defined(TEST_COMPILER_NVCC_BELOW_11_3) // Constraint: rank consistency static_assert( is_span_cons_avail_v< cuda::std::dextents, int , 2 > == false, "" ); @@ -67,7 +67,7 @@ int main(int, char**) #ifndef TEST_COMPILER_NVHPC static_assert( is_span_cons_avail_v< cuda::std::dextents, my_int_non_nothrow_constructible, 1 > == false, "" ); #endif // TEST_COMPILER_NVHPC -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) +#endif // !defined(TEST_COMPILER_NVCC_BELOW_11_3) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/iterators/iterator.range/begin-end.pass.cpp b/libcudacxx/.upstream-tests/test/std/iterators/iterator.range/begin-end.pass.cpp index 4f6dd5c7aee..4e87a5e53c2 100644 --- a/libcudacxx/.upstream-tests/test/std/iterators/iterator.range/begin-end.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/iterators/iterator.range/begin-end.pass.cpp @@ -147,7 +147,7 @@ void test_const_array( const T (&array)[Sz] ) { STATIC_TEST_GLOBAL_VAR TEST_CONSTEXPR_GLOBAL int global_array [] { 1, 2, 3 }; #if TEST_STD_VER > 14 -#if !defined(TEST_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER >= 1103000 +#if !defined(TEST_COMPILER_NVCC_BELOW_11_3) STATIC_TEST_GLOBAL_VAR TEST_CONSTEXPR_GLOBAL int global_const_array[] = {0,1,2,3,4}; #endif // nvcc > 11.2 #endif // TEST_STD_VER > 14 @@ -216,7 +216,7 @@ int main(int, char**) { static_assert ( *cuda::std::crbegin(local_const_array) == 4, "" ); } -#if !defined(TEST_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER >= 1103000 +#if !defined(TEST_COMPILER_NVCC_BELOW_11_3) { static_assert ( *cuda::std::begin(global_const_array) == 0, "" ); diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/ctor/ctor.inplace_init_list.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/ctor/ctor.inplace_init_list.pass.cpp index 651b0d558c7..eb4a2bb166d 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/ctor/ctor.inplace_init_list.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/ctor/ctor.inplace_init_list.pass.cpp @@ -146,9 +146,9 @@ __host__ __device__ void testException() { int main(int, char**) { test(); #if defined(_LIBCUDACXX_ADDRESSOF) -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif // defined(_LIBCUDACXX_ADDRESSOF) testException(); return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect_init_list.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect_init_list.pass.cpp index 811ea30a2bd..954d38c72a6 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect_init_list.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect_init_list.pass.cpp @@ -147,9 +147,9 @@ __host__ __device__ void testException() { int main(int, char**) { test(); #if defined(_LIBCUDACXX_ADDRESSOF) -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif // defined(_LIBCUDACXX_ADDRESSOF) testException(); return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/monadic/and_then.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/monadic/and_then.pass.cpp index 4af21aa8fe8..08baa769551 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/monadic/and_then.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/monadic/and_then.pass.cpp @@ -368,8 +368,8 @@ constexpr bool test() { int main(int, char**) { test(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/monadic/or_else.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/monadic/or_else.pass.cpp index 45576e04c67..8a819a56022 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/monadic/or_else.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.expected/monadic/or_else.pass.cpp @@ -368,8 +368,8 @@ constexpr bool test() { int main(int, char**) { test(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/and_then.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/and_then.pass.cpp index b7ab9f76f73..8642515ef70 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/and_then.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/and_then.pass.cpp @@ -258,8 +258,8 @@ constexpr bool test() { int main(int, char**) { test(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/or_else.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/or_else.pass.cpp index 9e918ba2b5f..0155b0b1265 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/or_else.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/or_else.pass.cpp @@ -355,8 +355,8 @@ constexpr bool test() { int main(int, char**) { test(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/transform.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/transform.pass.cpp index 0accf9c880d..a19c969a86f 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/transform.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/monadic/transform.pass.cpp @@ -213,8 +213,8 @@ constexpr bool test() { int main(int, char**) { test(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/observers/deref.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/observers/deref.pass.cpp index 0b80e3eb765..296f59c4bda 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/observers/deref.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/observers/deref.pass.cpp @@ -40,8 +40,8 @@ __host__ __device__ constexpr bool test() { int main(int, char**) { test(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/observers/value.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/observers/value.pass.cpp index 33ac91849eb..e7b7b1970dc 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/observers/value.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/expected/expected.void/observers/value.pass.cpp @@ -83,9 +83,9 @@ __host__ __device__ void testException() { int main(int, char**) { test(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) testException(); return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp index 0321c8a22c8..de290abe366 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/equal.pass.cpp @@ -74,9 +74,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp index 086d697fc1b..52c3b6aa91f 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/greater.pass.cpp @@ -74,9 +74,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp index 3828efda21c..29e43eaa863 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/greater_equal.pass.cpp @@ -76,9 +76,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp index 1dc4344b677..c78a6007567 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/less_equal.pass.cpp @@ -76,9 +76,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp index 7f274e08030..b1a1d3cc2a3 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/less_than.pass.cpp @@ -74,9 +74,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp index 8238a121c2b..56caca5f293 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.comp_with_t/not_equal.pass.cpp @@ -74,9 +74,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.monadic/or_else.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.monadic/or_else.pass.cpp index fc8c59a6d57..070e24db4cb 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.monadic/or_else.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.monadic/or_else.pass.cpp @@ -128,7 +128,7 @@ TEST_CONSTEXPR_CXX17 bool test_nontrivial() { int main(int, char**) { test(); test_nontrivial(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) // GCC <9 incorrectly trips on the assertions in this, so disable it there #if TEST_STD_VER > 14 && (!defined(TEST_COMPILER_GCC) || __GNUC__ < 9) static_assert(test(), ""); @@ -138,6 +138,6 @@ int main(int, char**) { static_assert(test_nontrivial()); #endif // defined(_LIBCUDACXX_ADDRESSOF) #endif // TEST_STD_VER > 17 -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/equal.pass.cpp index 920d07ed9c6..4271f311f5e 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/equal.pass.cpp @@ -46,9 +46,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/greater.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/greater.pass.cpp index 15e2815f340..79993322bfb 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/greater.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/greater.pass.cpp @@ -46,9 +46,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/greater_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/greater_equal.pass.cpp index 579bdfacf02..35ede59642d 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/greater_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/greater_equal.pass.cpp @@ -46,9 +46,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/less_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/less_equal.pass.cpp index decd4a81df3..1b7ebc25d79 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/less_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/less_equal.pass.cpp @@ -47,9 +47,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/less_than.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/less_than.pass.cpp index b1ce4dfa1cd..c5ffec46a22 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/less_than.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/less_than.pass.cpp @@ -46,9 +46,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/not_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/not_equal.pass.cpp index 9023e3b244a..efc6efab0cc 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/not_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.nullops/not_equal.pass.cpp @@ -46,9 +46,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp index 8c2c448f551..1f644ad96b6 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/assign_value.pass.cpp @@ -315,9 +315,9 @@ int main(int, char**) test_throws(); #if !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(pr38638(3) == 5, ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif // !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp index 60d79385ddd..29070c130f1 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp @@ -203,7 +203,7 @@ int main(int, char**) { test_with_test_type(); test_ambiguous_assign(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { optional opt; constexpr optional opt2; @@ -236,7 +236,7 @@ int main(int, char**) assert(static_cast(opt) == static_cast(opt2)); assert(*opt == *opt2); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #ifndef TEST_HAS_NO_EXCEPTIONS { optional opt; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp index 285404eeeb2..0ff8adbff7a 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp @@ -59,10 +59,10 @@ int main(int, char**) { using O = optional; #if !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(assign_empty(O{42}), ""); static_assert(assign_value(O{42}), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif // !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 assert(assign_empty(O{42})); assert(assign_value(O{42})); @@ -70,10 +70,10 @@ int main(int, char**) { using O = optional; #if !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(assign_empty(O{42}), ""); static_assert(assign_value(O{42}), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif // !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 assert(assign_empty(O{42})); assert(assign_value(O{42})); diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp index b7f21da6462..21547b45dc6 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp @@ -77,7 +77,7 @@ int main(int, char**) static_assert(static_cast(opt2) == false, ""); assert(static_cast(opt) == static_cast(opt2)); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { optional opt; constexpr optional opt2(2); @@ -87,7 +87,7 @@ int main(int, char**) assert(static_cast(opt) == static_cast(opt2)); assert(*opt == *opt2); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { optional opt(3); constexpr optional opt2; @@ -106,7 +106,7 @@ int main(int, char**) assert(static_cast(opt2) == false); assert(static_cast(opt) == static_cast(opt2)); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { optional opt(3); constexpr optional opt2(2); @@ -116,14 +116,14 @@ int main(int, char**) assert(static_cast(opt) == static_cast(opt2)); assert(*opt == *opt2); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { using O = optional; #if !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(assign_empty(O{42}), ""); static_assert(assign_value(O{42}), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif // !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 assert(assign_empty(O{42})); assert(assign_value(O{42})); @@ -131,10 +131,10 @@ int main(int, char**) { using O = optional; #if !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(assign_empty(O{42}), ""); static_assert(assign_value(O{42}), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif // !defined(TEST_COMPILER_GCC) || __GNUC__ > 6 assert(assign_empty(O{42})); assert(assign_value(O{42})); diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp index b1bbd5ffa6a..7db5eb9cf2e 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp @@ -74,25 +74,25 @@ constexpr bool explicit_conversion(Input&& in, const Expect& v) __host__ __device__ void test_implicit() { -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { static_assert(implicit_conversion(42, 42), ""); } { static_assert(implicit_conversion(3.14, 3.14), ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { int x = 42; optional o(&x); assert(*o == &x); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { using T = TrivialTestTypes::TestType; static_assert(implicit_conversion(42, 42), ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { using T = TestTypes::TestType; assert(implicit_conversion(3, T(3))); @@ -121,7 +121,7 @@ void test_implicit() __host__ __device__ void test_explicit() { -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { using T = ExplicitTrivialTestTypes::TestType; static_assert(explicit_conversion(42, 42), ""); @@ -131,7 +131,7 @@ void test_explicit() { static_assert(explicit_conversion(42, 42), ""); static_assert(!cuda::std::is_convertible::value, ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { using T = ExplicitTestTypes::TestType; T::reset(); diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp index 2a0466d8cd6..d2413b361a4 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp @@ -27,7 +27,7 @@ using cuda::std::optional; int main(int, char**) { -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { typedef int T; constexpr T t(5); @@ -58,7 +58,7 @@ int main(int, char**) }; } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { const int x = 42; optional o(x); @@ -85,7 +85,7 @@ int main(int, char**) assert(static_cast(opt) == true); assert(opt.value().value == 3); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { typedef ConstexprTestTypes::TestType T; constexpr T t(3); @@ -116,7 +116,7 @@ int main(int, char**) }; } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #ifndef TEST_HAS_NO_EXCEPTIONS { struct Z { diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp index 9338de76b4d..7259003b334 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp @@ -123,10 +123,10 @@ int main(int, char**) { test(); test(3); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(constexpr_test(), "" ); static_assert(constexpr_test(3), "" ); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { const optional o(42); @@ -172,13 +172,13 @@ int main(int, char**) { test_reference_extension(); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr cuda::std::optional o1{4}; constexpr cuda::std::optional o2 = o1; static_assert( *o2 == 4, "" ); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp index 82dff4838c2..a4236c45a7d 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp @@ -79,7 +79,7 @@ int main(int, char**) #endif test>(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test_constexpr>(), ""); static_assert(test_constexpr>(), ""); #if !defined(TEST_COMPILER_C1XX) || TEST_STD_VER >= 17 @@ -87,7 +87,7 @@ int main(int, char**) static_assert(test_constexpr>(), ""); static_assert(test_constexpr>(), ""); #endif -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp index 3e02b518d03..a7a0e4cc76e 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp @@ -71,7 +71,7 @@ class Z int main(int, char**) { -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(in_place, 5); static_assert(static_cast(opt) == true, ""); @@ -86,7 +86,7 @@ int main(int, char**) }; } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { optional opt(in_place, 5); assert(*opt == 5); @@ -106,7 +106,7 @@ int main(int, char**) assert(static_cast(opt) == true); assert(*opt == X(5, 4)); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(in_place); static_assert(static_cast(opt) == true, ""); @@ -149,7 +149,7 @@ int main(int, char**) }; } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #ifndef TEST_HAS_NO_EXCEPTIONS { try diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/initializer_list.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/initializer_list.pass.cpp index 74f4880af82..91bb8b23fea 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/initializer_list.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/initializer_list.pass.cpp @@ -110,13 +110,13 @@ int main(int, char**) assert(static_cast(opt) == true); assert((*opt == Y{3, 1})); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(in_place, {3, 1}); static_assert(static_cast(opt) == true, ""); static_assert(*opt == Y{3, 1}, ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) struct test_constexpr_ctor : public optional diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp index b7e24a8e343..9d69163cfb0 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp @@ -156,10 +156,10 @@ int main(int, char**) { test(); test(3); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(constexpr_test(), "" ); static_assert(constexpr_test(3), "" ); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { optional o(42); @@ -229,13 +229,13 @@ int main(int, char**) { test_reference_extension(); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr cuda::std::optional o1{4}; constexpr cuda::std::optional o2 = cuda::std::move(o1); static_assert( *o2 == 4, "" ); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp index 4d3e46bdc82..7df33a24ade 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp @@ -81,7 +81,7 @@ int main(int, char**) #endif test>(); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test_constexpr>(), ""); static_assert(test_constexpr>(), ""); #if !defined(TEST_COMPILER_C1XX) || TEST_STD_VER >= 17 @@ -89,7 +89,7 @@ int main(int, char**) static_assert(test_constexpr>(), ""); static_assert(test_constexpr>(), ""); #endif -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp index ff0b890afe2..56cd287e058 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp @@ -39,7 +39,7 @@ class Z int main(int, char**) { -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { typedef int T; constexpr optional opt(T(5)); @@ -66,7 +66,7 @@ int main(int, char**) constexpr test_constexpr_ctor(T&&) {} }; } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { const int x = 42; optional o(cuda::std::move(x)); @@ -102,7 +102,7 @@ int main(int, char**) assert(static_cast(opt) == true); assert(opt.value().value == 3); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { typedef ConstexprTestTypes::TestType T; constexpr optional opt = {T(3)}; @@ -144,7 +144,7 @@ int main(int, char**) }; } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #ifndef TEST_HAS_NO_EXCEPTIONS { try diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/bool.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/bool.pass.cpp index f330e00a6a1..39f8f833ddb 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/bool.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/bool.pass.cpp @@ -26,7 +26,7 @@ int main(int, char**) ASSERT_NOEXCEPT(bool(opt)); static_assert(!cuda::std::is_convertible, bool>::value, ""); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt; static_assert(!opt, ""); @@ -35,7 +35,7 @@ int main(int, char**) constexpr optional opt(0); static_assert(opt, ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp index 30cae48eaaa..6eee861ef28 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp @@ -65,9 +65,9 @@ int main(int, char**) optional opt(X{}); assert((*opt).test() == 4); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test() == 7, ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp index 0b953ad54b0..3d4724cbece 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) // Regardless this function should still be noexcept(false) because // it has a narrow contract. } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(X{}); static_assert((*opt).test() == 3, ""); @@ -62,7 +62,7 @@ int main(int, char**) constexpr optional opt(Y{}); assert((*opt).test() == 2); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp index acb593a5880..c70e2dccbf3 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) // Regardless this function should still be noexcept(false) because // it has a narrow contract. } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(X{}); static_assert((*cuda::std::move(opt)).test() == 5, ""); @@ -62,7 +62,7 @@ int main(int, char**) constexpr optional opt(Y{}); assert((*cuda::std::move(opt)).test() == 2); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp index 93b8e9d4c00..6ab9f9ee0b5 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp @@ -65,9 +65,9 @@ int main(int, char**) optional opt(X{}); assert((*cuda::std::move(opt)).test() == 6); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test() == 7, ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/has_value.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/has_value.pass.cpp index 21ea2ab3ede..31883e76ee5 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/has_value.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/has_value.pass.cpp @@ -34,7 +34,7 @@ int main(int, char**) optional opt(0); assert(opt.has_value()); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt; static_assert(!opt.has_value(), ""); @@ -43,7 +43,7 @@ int main(int, char**) constexpr optional opt(0); static_assert(opt.has_value(), ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp index 68b2a18bc37..eac5585bf28 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp @@ -60,9 +60,9 @@ int main(int, char**) } { #if defined(_LIBCUDACXX_ADDRESSOF) -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test() == 3, ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp index eb9a0acf8fc..f64adbada80 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp @@ -54,7 +54,7 @@ int main(int, char**) // Regardless this function should still be noexcept(false) because // it has a narrow contract. } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(X{}); #if defined(_LIBCUDACXX_ADDRESSOF) @@ -75,7 +75,7 @@ int main(int, char**) unused(opt); #endif } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp index 3511fb84fb6..6994345e687 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp @@ -83,9 +83,9 @@ int main(int, char**) } #endif assert(test() == 7); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test() == 7, ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp index 34f416820ea..aca19151a59 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp @@ -50,12 +50,12 @@ int main(int, char**) ASSERT_NOT_NOEXCEPT(opt.value()); ASSERT_SAME_TYPE(decltype(opt.value()), X const&); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(in_place); static_assert(opt.value().test() == 3, ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { const optional opt(in_place); assert(opt.value().test() == 3); diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp index 5f8b4a634a2..9ed04ed79f3 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp @@ -50,12 +50,12 @@ int main(int, char**) ASSERT_NOT_NOEXCEPT(cuda::std::move(opt).value()); ASSERT_SAME_TYPE(decltype(cuda::std::move(opt).value()), X const&&); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(in_place); static_assert(cuda::std::move(opt).value().test() == 5, ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { const optional opt(in_place); assert(cuda::std::move(opt).value().test() == 5); diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_or_const.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_or_const.pass.cpp index 16ead269264..a4ea8490961 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_or_const.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_or_const.pass.cpp @@ -45,7 +45,7 @@ struct X int main(int, char**) { -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(2); constexpr Y y(3); @@ -64,7 +64,7 @@ int main(int, char**) constexpr optional opt; static_assert(opt.value_or(Y(3)) == 4, ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { const optional opt(2); const Y y(3); diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp index fb21af796f6..40f901ed510 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp @@ -81,9 +81,9 @@ int main(int, char**) } #endif assert(test() == 7); -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test() == 7, ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) return 0; } diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/equal.pass.cpp index cca03a98c3e..b724b11a42a 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/equal.pass.cpp @@ -95,9 +95,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp index 932f5ce4a45..b556d22eca5 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/greater_equal.pass.cpp @@ -93,9 +93,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/greater_than.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/greater_than.pass.cpp index 0996aaa70db..f04a52bafd2 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/greater_than.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/greater_than.pass.cpp @@ -91,9 +91,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/less_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/less_equal.pass.cpp index 35cdbae7e51..0591b859c55 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/less_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/less_equal.pass.cpp @@ -93,9 +93,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/less_than.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/less_than.pass.cpp index 7be8e8e576e..234951577ad 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/less_than.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/less_than.pass.cpp @@ -91,9 +91,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/not_equal.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/not_equal.pass.cpp index 779ca08a8f9..f76baaec0fa 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/not_equal.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.relops/not_equal.pass.cpp @@ -96,9 +96,9 @@ constexpr bool test() { int main(int, char**) { test(); #if TEST_STD_VER >= 17 -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test()); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif return 0; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp index 8f951c638bd..7ea96be4b49 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp @@ -38,13 +38,13 @@ int main(int, char**) ASSERT_SAME_TYPE(decltype(opt), cuda::std::optional); assert(*opt == arr); } -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr auto opt = cuda::std::make_optional(2); ASSERT_SAME_TYPE(decltype(opt), const cuda::std::optional); static_assert(opt.value() == 2, ""); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { auto opt = cuda::std::make_optional(2); ASSERT_SAME_TYPE(decltype(opt), cuda::std::optional); diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp index 29b76c692f7..800f07912ba 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional_explicit.pass.cpp @@ -28,13 +28,13 @@ int main(int, char**) { -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr auto opt = cuda::std::make_optional('a'); static_assert(*opt == int('a'), ""); assert(*opt == int('a')); } -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #ifdef _LIBCUDACXX_HAS_STRING { cuda::std::string s = "123"; diff --git a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp index 83e9cd660eb..c7b43f04fd2 100644 --- a/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp +++ b/libcudacxx/.upstream-tests/test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp @@ -57,9 +57,9 @@ int main(int, char**) { test(); #if defined(_LIBCUDACXX_ADDRESSOF) -#if !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#if !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test(), ""); -#endif // !(defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(TEST_COMPILER_CLANG)) +#endif // !(defined(TEST_COMPILER_NVCC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) #endif /* { diff --git a/libcudacxx/.upstream-tests/test/support/test_macros.h b/libcudacxx/.upstream-tests/test/support/test_macros.h index 692149e4af8..dc713598fef 100644 --- a/libcudacxx/.upstream-tests/test/support/test_macros.h +++ b/libcudacxx/.upstream-tests/test/support/test_macros.h @@ -424,6 +424,11 @@ constexpr bool unused(T &&) {return true;} #define TEST_CONSTEXPR_GLOBAL _LIBCUDACXX_CONSTEXPR_GLOBAL +// Some convenience macros for checking nvcc versions +#if defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 +#define TEST_COMPILER_NVCC_BELOW_11_3 +#endif // defined(TEST_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 + #if defined(__GNUC__) #pragma GCC diagnostic pop #endif diff --git a/libcudacxx/include/cuda/std/detail/__annotated_ptr b/libcudacxx/include/cuda/std/detail/__annotated_ptr index 5c5f9680365..d0f2cd7e5ee 100644 --- a/libcudacxx/include/cuda/std/detail/__annotated_ptr +++ b/libcudacxx/include/cuda/std/detail/__annotated_ptr @@ -61,9 +61,9 @@ namespace __detail_ap { if (std::is_same<_Property, access_property::shared>::value == true) { bool __b = __isShared(__ptr); _LIBCUDACXX_ASSERT(__b, ""); -#if !defined(_LIBCUDACXX_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER >= 1102000 +#if !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_2) __builtin_assume(__b); -#endif // nvcc > 11.1 +#endif // !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_2) } else if (std::is_same<_Property, access_property::global>::value == true || std::is_same<_Property, access_property::normal>::value == true || std::is_same<_Property, access_property::persisting>::value == true || @@ -71,9 +71,9 @@ namespace __detail_ap { std::is_same<_Property, access_property>::value) { bool __b = __isGlobal(__ptr); _LIBCUDACXX_ASSERT(__b, ""); -#if !defined(_LIBCUDACXX_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER >= 1102000 +#if !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_2) __builtin_assume(__b); -#endif // nvcc > 11.1 +#endif // !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_2) } return __ptr; diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__config b/libcudacxx/include/cuda/std/detail/libcxx/include/__config index 46626fbf922..22143afd940 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__config +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__config @@ -37,6 +37,18 @@ # define _LIBCUDACXX_COMPILER_CLANG_CUDA #endif +// Some convenience macros to filter nvcc versions +#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1102000 +#define _LIBCUDACXX_COMPILER_NVCC_BELOW_11_2 +#endif // defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1102000 +#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 +#define _LIBCUDACXX_COMPILER_NVCC_BELOW_11_3 +#endif // defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 + +#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1108000 +#define _LIBCUDACXX_COMPILER_NVCC_BELOW_11_8 +#endif // defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1108000 + #if defined(_MSC_VER) && !defined(__clang__) # define _LIBCUDACXX_HAS_PRAGMA_MSVC_WARNING # if !defined(_LIBCUDACXX_DISABLE_PRAGMA_MSVC_WARNING) @@ -629,7 +641,7 @@ extern "C++" { #define _LIBCUDACXX_IS_LVALUE_REFERENCE(...) __is_lvalue_reference(__VA_ARGS__) #endif // __check_builtin(is_lvalue_reference) -#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 +#if defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) #define _LIBCUDACXX_USE_IS_LVALUE_REFERENCE_FALLBACK #endif // nvcc < 11.3 @@ -655,7 +667,7 @@ extern "C++" { #define _LIBCUDACXX_IS_OBJECT(...) __is_object(__VA_ARGS__) #endif // __check_builtin(is_object) -#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 +#if defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) #define _LIBCUDACXX_USE_IS_OBJECT_FALLBACK #endif // nvcc < 11.3 @@ -757,7 +769,7 @@ extern "C++" { #define _LIBCUDACXX_IS_UNSIGNED(...) __is_unsigned(__VA_ARGS__) #endif // __check_builtin(is_unsigned) -#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 +#if defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) #define _LIBCUDACXX_USE_IS_UNSIGNED_FALLBACK #endif // nvcc < 11.3 @@ -1112,7 +1124,7 @@ typedef __char32_t char32_t; // [[msvc::no_unique_address]] though. If/when it does implement // [[msvc::no_unique_address]], this should be preferred though. # define _LIBCUDACXX_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] -#elif (defined(_LIBCUDACXX_COMPILER_NVCC) && (_LIBCUDACXX_CUDACC_VER < 1103000)) \ +#elif defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) \ || (__has_cpp_attribute(no_unique_address) < 201803L) # define _LIBCUDACXX_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS # define _LIBCUDACXX_NO_UNIQUE_ADDRESS @@ -1635,7 +1647,7 @@ typedef unsigned int char32_t; // by defining _LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS. // NVCC 11.1 and 11.2 are broken with the deprecated attribute, so disable it #if !defined(_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS) \ - && (!defined(_LIBCUDACXX_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER > 1102000) + && !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) # if __has_attribute(deprecated) # define _LIBCUDACXX_DEPRECATED __attribute__ ((deprecated)) # elif _LIBCUDACXX_STD_VER > 11 @@ -2051,7 +2063,7 @@ extern "C" _LIBCUDACXX_FUNC_VIS void __sanitizer_annotate_contiguous_container( #define _LIBCUDACXX_HAS_NO_CONSTEXPR_COMPLEX_OPERATIONS #elif defined(_MSC_VER) #define _LIBCUDACXX_HAS_NO_CONSTEXPR_COMPLEX_OPERATIONS -#elif defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1108000 +#elif defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_8) #define _LIBCUDACXX_HAS_NO_CONSTEXPR_COMPLEX_OPERATIONS #endif diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected_base.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected_base.h index 6285ce3128b..a88bba67596 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected_base.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__expected/expected_base.h @@ -367,7 +367,7 @@ struct __expected_storage : __expected_destruct<_Tp, _Err> // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __expected_storage() noexcept = default; template = 0> @@ -461,7 +461,7 @@ struct __expected_copy : __expected_storage<_Tp, _Err> using __base = __expected_storage<_Tp, _Err>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __expected_copy() noexcept = default; template = 0> @@ -481,7 +481,7 @@ struct __expected_copy<_Tp, _Err, false> : __expected_storage<_Tp, _Err> // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __expected_copy(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -519,7 +519,7 @@ struct __expected_move : __expected_copy<_Tp, _Err> using __base = __expected_copy<_Tp, _Err>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __expected_move() noexcept = default; template = 0> @@ -538,7 +538,7 @@ struct __expected_move<_Tp, _Err, false> : __expected_copy<_Tp, _Err> using __base = __expected_copy<_Tp, _Err>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __expected_move(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -580,7 +580,7 @@ struct __expected_copy_assign : __expected_move<_Tp, _Err> using __base = __expected_move<_Tp, _Err>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __expected_copy_assign() noexcept = default; template = 0> @@ -599,7 +599,7 @@ struct __expected_copy_assign<_Tp, _Err, false> : __expected_move<_Tp, _Err> using __base = __expected_move<_Tp, _Err>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __expected_copy_assign(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -649,7 +649,7 @@ struct __expected_move_assign : __expected_copy_assign<_Tp, _Err> using __base = __expected_copy_assign<_Tp, _Err>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __expected_move_assign() noexcept = default; template = 0> @@ -668,7 +668,7 @@ struct __expected_move_assign<_Tp, _Err, false> : __expected_copy_assign<_Tp, _E using __base = __expected_copy_assign<_Tp, _Err>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __expected_move_assign(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -852,7 +852,7 @@ struct __expected_storage : __expected_destruct using __base = __expected_destruct; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __expected_storage() noexcept = default; template = 0> @@ -880,7 +880,7 @@ struct __expected_copy : __expected_storage using __base = __expected_storage; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __expected_copy(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -913,7 +913,7 @@ struct __expected_move : __expected_copy using __base = __expected_copy; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __expected_move(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -946,7 +946,7 @@ struct __expected_copy_assign : __expected_move using __base = __expected_move; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __expected_copy_assign(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -988,7 +988,7 @@ struct __expected_move_assign : __expected_copy_assign; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __expected_move_assign(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/standard_layout_static_array.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/standard_layout_static_array.h index b11db8c5296..b163a40da7f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/standard_layout_static_array.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/standard_layout_static_array.h @@ -614,7 +614,7 @@ struct __partially_static_sizes_tagged using __psa_impl_t = __standard_layout_psa< _Tag, T, _static_t, _CUDA_VSTD::integer_sequence<_static_t, __values_or_sentinals...>>; #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1102000) + || defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) template = 0> __MDSPAN_FORCE_INLINE_FUNCTION constexpr __partially_static_sizes_tagged(_Args&&... __args) noexcept(noexcept(__psa_impl_t(_CUDA_VSTD::declval<_Args>()...))) @@ -666,7 +666,7 @@ struct __partially_static_sizes ) noexcept : __base_t(_CUDA_VSTD::move(__vals)) { } public: #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1102000) + || defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) template = 0> __MDSPAN_FORCE_INLINE_FUNCTION constexpr __partially_static_sizes(_Args&&... __args) noexcept(noexcept(__base_t(_CUDA_VSTD::declval<_Args>()...))) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/static_array.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/static_array.h index 0d98f95005c..690ae2f0709 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/static_array.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__mdspan/static_array.h @@ -263,7 +263,7 @@ class __partially_static_array_with_sentinal using __base_t = typename __partially_static_array_impl_maker<_Tp, _static_t, _ValsSeq, __sentinal>::__impl_base; public: #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1102000) + || defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) constexpr __partially_static_array_with_sentinal() = default; template @@ -288,7 +288,7 @@ struct __partially_static_sizes : T, _static_t, _CUDA_VSTD::integer_sequence<_static_t, __values_or_sentinals...>>; public: #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1102000) + || defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) constexpr __partially_static_sizes() = default; template diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/bit b/libcudacxx/include/cuda/std/detail/libcxx/include/bit index 4e22ff8466e..07632b308c8 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/bit +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/bit @@ -192,7 +192,7 @@ int __fallback_popc64(uint64_t __x) { inline _LIBCUDACXX_INLINE_VISIBILITY constexpr int __libcpp_ctz(unsigned __x) noexcept { #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3)) #if defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) && (_LIBCUDACXX_STD_VER >= 14) if (!__libcpp_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, ( @@ -212,7 +212,7 @@ int __libcpp_ctz(unsigned __x) noexcept { inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_BIT_CONSTEXPR int __libcpp_ctz(unsigned long __x) noexcept { #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3)) #if defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) && (_LIBCUDACXX_STD_VER >= 14) if (!__libcpp_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, ( @@ -252,7 +252,7 @@ int __libcpp_ctz(unsigned long long __x) _NOEXCEPT { inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_BIT_CONSTEXPR int __libcpp_clz(unsigned __x) _NOEXCEPT { #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3)) #if defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) && (_LIBCUDACXX_STD_VER >= 14) if (!__libcpp_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, ( @@ -271,7 +271,7 @@ int __libcpp_clz(unsigned __x) _NOEXCEPT { inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_BIT_CONSTEXPR int __libcpp_clz(unsigned long __x) _NOEXCEPT { #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3)) #if defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) && (_LIBCUDACXX_STD_VER >= 14) if (!__libcpp_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, ( @@ -291,7 +291,7 @@ int __libcpp_clz(unsigned long __x) _NOEXCEPT { inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_BIT_CONSTEXPR int __libcpp_clz(unsigned long long __x) _NOEXCEPT { #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3)) #if defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) && (_LIBCUDACXX_STD_VER >= 14) if (!__libcpp_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, ( @@ -311,7 +311,7 @@ int __libcpp_clz(unsigned long long __x) _NOEXCEPT { inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_BIT_CONSTEXPR int __libcpp_popcount(unsigned __x) _NOEXCEPT { #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3)) #if defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) && (_LIBCUDACXX_STD_VER >= 14) if (!__libcpp_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, ( @@ -331,7 +331,7 @@ int __libcpp_popcount(unsigned __x) _NOEXCEPT { inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_BIT_CONSTEXPR int __libcpp_popcount(unsigned long __x) _NOEXCEPT { #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3)) #if defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) && (_LIBCUDACXX_STD_VER >= 14) if (!__libcpp_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, ( @@ -351,7 +351,7 @@ int __libcpp_popcount(unsigned long __x) _NOEXCEPT { inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_BIT_CONSTEXPR int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3)) #if defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) && (_LIBCUDACXX_STD_VER >= 14) if (!__libcpp_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, ( diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath index c588bde44cb..66afdae145d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath @@ -613,7 +613,7 @@ _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR __enable_if_t::value, bool> __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT { -#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1108000 +#if defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_8) return __isnan(__lcpp_x); #elif __has_builtin(__builtin_isnan) return __builtin_isnan(__lcpp_x); @@ -635,7 +635,7 @@ _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR __enable_if_t::value, bool> __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT { -#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1108000 +#if defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_8) return __isinf(__lcpp_x); #elif __has_builtin(__builtin_isinf) return __builtin_isinf(__lcpp_x); @@ -657,7 +657,7 @@ _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR __enable_if_t::value, bool> __constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT { -#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1108000 +#if defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_8) return !__isinf(__lcpp_x) && !__isnan(__lcpp_x); #elif __has_builtin(__builtin_isfinite) return __builtin_isfinite(__lcpp_x); diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdlib b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdlib index 11c1fa6361a..d01a29973be 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cstdlib +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cstdlib @@ -98,13 +98,13 @@ void *aligned_alloc(size_t alignment, size_t size); // C11 #pragma GCC system_header #endif -#if defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1102000 +#if defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_2) #ifdef __CUDA_ARCH__ # define _LIBCUDACXX_UNREACHABLE() __trap() #else // ^^^ __CUDA_ARCH__ ^^^ / vvv !__CUDA_ARCH__ vvv # define _LIBCUDACXX_UNREACHABLE() __builtin_unreachable() #endif // !__CUDA_ARCH__ -#elif defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 +#elif defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) #ifdef __CUDA_ARCH__ # define _LIBCUDACXX_UNREACHABLE() __builtin_assume(false) #else // ^^^ __CUDA_ARCH__ ^^^ / vvv !__CUDA_ARCH__ vvv diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/optional b/libcudacxx/include/cuda/std/detail/libcxx/include/optional index 272a1cb579e..62e22ec5d6f 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/optional +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/optional @@ -346,7 +346,7 @@ struct __optional_storage_base : __optional_destruct_base<_Tp> // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __optional_storage_base(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -432,7 +432,7 @@ struct __optional_copy_base : __optional_storage_base<_Tp> // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __optional_copy_base() noexcept = default; template = 0> @@ -452,7 +452,7 @@ struct __optional_copy_base<_Tp, false> : __optional_storage_base<_Tp> // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __optional_copy_base(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -485,7 +485,7 @@ struct __optional_move_base : __optional_copy_base<_Tp> // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __optional_move_base() noexcept = default; template = 0> @@ -506,7 +506,7 @@ struct __optional_move_base<_Tp, false> : __optional_copy_base<_Tp> // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __optional_move_base(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -539,7 +539,7 @@ struct __optional_copy_assign_base : __optional_move_base<_Tp> using __base = __optional_move_base<_Tp>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __optional_copy_assign_base() noexcept = default; template = 0> @@ -558,7 +558,7 @@ struct __optional_copy_assign_base<_Tp, false> : __optional_move_base<_Tp> using __base = __optional_move_base<_Tp>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __optional_copy_assign_base(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) @@ -591,7 +591,7 @@ struct __optional_move_assign_base : __optional_copy_assign_base<_Tp> using __base = __optional_copy_assign_base<_Tp>; // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) constexpr __optional_move_assign_base() noexcept = default; template = 0> @@ -612,7 +612,7 @@ struct __optional_move_assign_base<_Tp, false> : __optional_copy_assign_base<_Tp // nvbug3961621 #if defined(_LIBCUDACXX_COMPILER_NVRTC) \ - || (defined(_LIBCUDACXX_COMPILER_NVCC) && _LIBCUDACXX_CUDACC_VER < 1103000 && defined(_LIBCUDACXX_COMPILER_CLANG)) + || (defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) && defined(_LIBCUDACXX_COMPILER_CLANG)) template = 0> _LIBCUDACXX_INLINE_VISIBILITY constexpr __optional_move_assign_base(_Args&&... __args) noexcept(noexcept(__base(_CUDA_VSTD::declval<_Args>()...))) diff --git a/libcudacxx/include/cuda/stream_ref b/libcudacxx/include/cuda/stream_ref index 7b42a7877e6..ca5b8b917c9 100644 --- a/libcudacxx/include/cuda/stream_ref +++ b/libcudacxx/include/cuda/stream_ref @@ -109,9 +109,9 @@ public: * \return true if equal, false if unequal */ -#if !defined(_LIBCUDACXX_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER > 1103000 +#if !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) _LIBCUDACXX_NODISCARD_ATTRIBUTE -#endif // !defined(_LIBCUDACXX_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER > 1103000 +#endif // !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) friend constexpr bool operator==(const stream_ref& __lhs, const stream_ref& __rhs) noexcept { return __lhs.__stream == __rhs.__stream; @@ -127,9 +127,9 @@ public: * \param rhs The second `stream_view` to compare * \return true if unequal, false if equal */ -#if !defined(_LIBCUDACXX_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER > 1103000 +#if !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) _LIBCUDACXX_NODISCARD_ATTRIBUTE -#endif // !defined(_LIBCUDACXX_COMPILER_NVCC) || _LIBCUDACXX_CUDACC_VER > 1103000 +#endif // !defined(_LIBCUDACXX_COMPILER_NVCC_BELOW_11_3) friend constexpr bool operator!=(const stream_ref& __lhs, const stream_ref& __rhs) noexcept { return __lhs.__stream != __rhs.__stream;