From 15f3c74b2e6ed8ec02e5123171eb884c46ea5533 Mon Sep 17 00:00:00 2001 From: fbusato Date: Mon, 27 Jan 2025 16:59:17 -0800 Subject: [PATCH 01/14] remove MSVC2017 macro paths --- CMakePresets.json | 1 - cmake/CCCLBuildCompilerTargets.cmake | 5 -- cub/cub/util_cpp_dialect.cuh | 3 - .../uninitialized_async_buffer.cuh | 4 +- .../__container/uninitialized_buffer.cuh | 4 +- .../__memory_resource/any_resource.cuh | 5 -- .../__memory_resource/device_memory_pool.cuh | 4 +- .../device_memory_resource.cuh | 4 +- .../__memory_resource/get_memory_resource.cuh | 5 -- .../__memory_resource/properties.cuh | 5 -- .../__memory_resource/shared_resource.cuh | 5 -- docs/cccl_development/macro.rst | 2 - .../cuda/__memory_resource/get_property.h | 4 +- .../cuda/__memory_resource/properties.h | 4 +- .../include/cuda/__memory_resource/resource.h | 4 +- .../cuda/__memory_resource/resource_ref.h | 4 +- .../std/__algorithm/iterator_operations.h | 4 +- .../std/__algorithm/ranges_iterator_concept.h | 4 +- libcudacxx/include/cuda/std/__cccl/compiler.h | 8 +-- .../include/cuda/std/__cccl/diagnostic.h | 11 +--- .../include/cuda/std/__cccl/unreachable.h | 9 +-- libcudacxx/include/cuda/std/__fwd/get.h | 4 +- libcudacxx/include/cuda/std/__fwd/subrange.h | 4 +- .../include/cuda/std/__iterator/concepts.h | 16 +----- .../include/cuda/std/__iterator/distance.h | 4 +- .../cuda/std/__iterator/move_iterator.h | 23 +------- libcudacxx/include/cuda/std/__iterator/next.h | 4 +- libcudacxx/include/cuda/std/__iterator/prev.h | 4 +- .../cuda/std/__iterator/reverse_iterator.h | 13 ----- libcudacxx/include/cuda/std/__ranges/empty.h | 4 +- .../include/cuda/std/__ranges/empty_view.h | 2 +- libcudacxx/include/cuda/std/__ranges/rbegin.h | 4 +- libcudacxx/include/cuda/std/__ranges/rend.h | 4 +- .../include/cuda/std/__ranges/subrange.h | 4 +- .../include/cuda/std/__ranges/unwrap_end.h | 4 +- .../cuda/std/__ranges/view_interface.h | 4 +- .../std/__tuple_dir/structured_bindings.h | 2 - .../include/cuda/std/__tuple_dir/tuple_like.h | 4 +- .../cuda/std/detail/libcxx/include/span | 38 ++----------- .../cuda/std/detail/libcxx/include/variant | 4 +- libcudacxx/include/cuda/std/inplace_vector | 32 ----------- .../test/internal_headers/CMakeLists.txt | 3 - libcudacxx/test/libcudacxx/CMakeLists.txt | 4 -- .../indirectly_copyable.compile.pass.cpp | 4 -- .../indirectly_movable.compile.pass.cpp | 4 -- ...directly_movable_storable.compile.pass.cpp | 2 - .../move.iter.nonmember/iter_swap.pass.cpp | 4 -- libcudacxx/test/public_headers/CMakeLists.txt | 3 - .../public_headers_host_only/CMakeLists.txt | 3 - libcudacxx/test/support/test_iterators.h | 57 +++++++++---------- libcudacxx/test/support/test_range.h | 2 - thrust/testing/cuda/transform.cu | 3 - thrust/thrust/detail/config/cpp_dialect.h | 3 - thrust/thrust/iterator/permutation_iterator.h | 4 -- thrust/thrust/iterator/reverse_iterator.h | 4 -- thrust/thrust/iterator/transform_iterator.h | 14 +---- thrust/thrust/iterator/zip_iterator.h | 4 -- 57 files changed, 91 insertions(+), 304 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index dcaf9b75977..5940422fa47 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -22,7 +22,6 @@ "CCCL_ENABLE_TESTING": false, "CCCL_ENABLE_EXAMPLES": false, "CCCL_ENABLE_C": false, - "CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING": true, "libcudacxx_ENABLE_INSTALL_RULES": true, "CUB_ENABLE_INSTALL_RULES": true, "Thrust_ENABLE_INSTALL_RULES": true, diff --git a/cmake/CCCLBuildCompilerTargets.cmake b/cmake/CCCLBuildCompilerTargets.cmake index 98644b69779..6193e7b23a6 100644 --- a/cmake/CCCLBuildCompilerTargets.cmake +++ b/cmake/CCCLBuildCompilerTargets.cmake @@ -23,7 +23,6 @@ set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded) option(CCCL_ENABLE_EXCEPTIONS "Enable exceptions within CCCL libraries." ON) option(CCCL_ENABLE_RTTI "Enable RTTI within CCCL libraries." ON) option(CCCL_ENABLE_WERROR "Treat warnings as errors for CCCL targets." ON) -option(CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING "Suppress Visual Studio 2017 deprecation warnings" OFF) function(cccl_build_compiler_interface interface_target cuda_compile_options cxx_compile_options compile_defs) add_library(${interface_target} INTERFACE) @@ -68,10 +67,6 @@ function(cccl_build_compiler_targets) list(APPEND cxx_compile_definitions "CCCL_DISABLE_RTTI") endif() - if (CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) - list(APPEND cxx_compile_definitions "CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING") - endif() - if ("MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}") list(APPEND cuda_compile_options "--use-local-env") list(APPEND cxx_compile_options "/bigobj") diff --git a/cub/cub/util_cpp_dialect.cuh b/cub/cub/util_cpp_dialect.cuh index d765b6374aa..e856f97ccd5 100644 --- a/cub/cub/util_cpp_dialect.cuh +++ b/cub/cub/util_cpp_dialect.cuh @@ -76,9 +76,6 @@ CUB_COMPILER_DEPRECATION(Clang 7.0); # elif _CCCL_COMPILER(MSVC, <, 19, 10) // <2017. Hard upgrade message: CUB_COMPILER_DEPRECATION(MSVC 2019(19.20 / 16.0 / 14.20)); -# elif _CCCL_COMPILER(MSVC2017) -// >=2017, <2019. Soft deprecation message: -CUB_COMPILER_DEPRECATION_SOFT(MSVC 2019(19.20 / 16.0 / 14.20), MSVC 2017); # endif # endif // CCCL_IGNORE_DEPRECATED_COMPILER diff --git a/cudax/include/cuda/experimental/__container/uninitialized_async_buffer.cuh b/cudax/include/cuda/experimental/__container/uninitialized_async_buffer.cuh index 3f55084dc63..c40ad9c9905 100644 --- a/cudax/include/cuda/experimental/__container/uninitialized_async_buffer.cuh +++ b/cudax/include/cuda/experimental/__container/uninitialized_async_buffer.cuh @@ -34,7 +34,7 @@ #include #include -#if _CCCL_STD_VER >= 2014 && !_CCCL_COMPILER(MSVC2017) && defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) +#if _CCCL_STD_VER >= 2014 && defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) //! @file //! The \c uninitialized_async_buffer class provides a typed buffer allocated in stream-order from a given memory @@ -298,6 +298,6 @@ using uninitialized_async_device_buffer = uninitialized_async_buffer<_Tp, device } // namespace cuda::experimental -#endif // _CCCL_STD_VER >= 2014 && !_CCCL_COMPILER(MSVC2017) && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE +#endif // _CCCL_STD_VER >= 2014 && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif //__CUDAX__CONTAINERS_UNINITIALIZED_ASYNC_BUFFER_H diff --git a/cudax/include/cuda/experimental/__container/uninitialized_buffer.cuh b/cudax/include/cuda/experimental/__container/uninitialized_buffer.cuh index 55168b38805..663a94cb21c 100644 --- a/cudax/include/cuda/experimental/__container/uninitialized_buffer.cuh +++ b/cudax/include/cuda/experimental/__container/uninitialized_buffer.cuh @@ -33,7 +33,7 @@ #include #include -#if _CCCL_STD_VER >= 2014 && !_CCCL_COMPILER(MSVC2017) && defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) +#if _CCCL_STD_VER >= 2014 && defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) //! @file //! The \c uninitialized_buffer class provides a typed buffer allocated from a given memory resource. @@ -263,6 +263,6 @@ using uninitialized_device_buffer = uninitialized_buffer<_Tp, device_accessible> } // namespace cuda::experimental -#endif // _CCCL_STD_VER >= 2014 && !_CCCL_COMPILER(MSVC2017) && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE +#endif // _CCCL_STD_VER >= 2014 && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif //__CUDAX__CONTAINERS_UNINITIALIZED_BUFFER_H diff --git a/cudax/include/cuda/experimental/__memory_resource/any_resource.cuh b/cudax/include/cuda/experimental/__memory_resource/any_resource.cuh index 0e1dceff19b..db48de38362 100644 --- a/cudax/include/cuda/experimental/__memory_resource/any_resource.cuh +++ b/cudax/include/cuda/experimental/__memory_resource/any_resource.cuh @@ -27,11 +27,6 @@ # error "To use the experimental memory resource, define LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE" #endif -// cuda::mr is unavable on MSVC 2017 -#if _CCCL_COMPILER(MSVC2017) -# error "The any_resource header is not supported on MSVC 2017" -#endif - #if !defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) # define LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif diff --git a/cudax/include/cuda/experimental/__memory_resource/device_memory_pool.cuh b/cudax/include/cuda/experimental/__memory_resource/device_memory_pool.cuh index 9dce7ef8f86..a1a574a6357 100644 --- a/cudax/include/cuda/experimental/__memory_resource/device_memory_pool.cuh +++ b/cudax/include/cuda/experimental/__memory_resource/device_memory_pool.cuh @@ -22,7 +22,7 @@ #endif // no system header // cudaMallocAsync was introduced in CTK 11.2 -#if !_CCCL_COMPILER(MSVC2017) && _CCCL_CUDACC_AT_LEAST(11, 2) +#if _CCCL_CUDACC_AT_LEAST(11, 2) # if _CCCL_CUDA_COMPILER(CLANG) # include @@ -427,6 +427,6 @@ public: # endif // _CCCL_STD_VER >= 2014 -#endif // !_CCCL_COMPILER(MSVC2017) && _CCCL_CUDACC_AT_LEAST(11, 2) +#endif // _CCCL_CUDACC_AT_LEAST(11, 2) #endif // _CUDAX__MEMORY_RESOURCE_DEVICE_MEMORY_POOL diff --git a/cudax/include/cuda/experimental/__memory_resource/device_memory_resource.cuh b/cudax/include/cuda/experimental/__memory_resource/device_memory_resource.cuh index 2f727fd5dc1..9fb46e2048f 100644 --- a/cudax/include/cuda/experimental/__memory_resource/device_memory_resource.cuh +++ b/cudax/include/cuda/experimental/__memory_resource/device_memory_resource.cuh @@ -22,7 +22,7 @@ #endif // no system header // cudaMallocAsync was introduced in CTK 11.2 -#if !_CCCL_COMPILER(MSVC2017) && _CCCL_CUDACC_AT_LEAST(11, 2) +#if _CCCL_CUDACC_AT_LEAST(11, 2) # if _CCCL_CUDA_COMPILER(CLANG) # include @@ -383,6 +383,6 @@ static_assert(_CUDA_VMR::resource_with # include @@ -153,6 +153,6 @@ _LIBCUDACXX_END_NAMESPACE_CUDA # endif // _CCCL_STD_VER >= 2014 -#endif // !_CCCL_COMPILER(MSVC2017) && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE +#endif // LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif //_CUDA__MEMORY_RESOURCE_GET_PROPERTY_H diff --git a/libcudacxx/include/cuda/__memory_resource/properties.h b/libcudacxx/include/cuda/__memory_resource/properties.h index 7fea8290367..fae9a2b634e 100644 --- a/libcudacxx/include/cuda/__memory_resource/properties.h +++ b/libcudacxx/include/cuda/__memory_resource/properties.h @@ -24,7 +24,7 @@ #include #include -#if !_CCCL_COMPILER(MSVC2017) && defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) +#if defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) # if _CCCL_STD_VER >= 2014 @@ -68,6 +68,6 @@ _LIBCUDACXX_END_NAMESPACE_CUDA_MR # endif // _CCCL_STD_VER >= 2014 -#endif // !_CCCL_COMPILER(MSVC2017) && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE +#endif // LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif //_CUDA__MEMORY_RESOURCE_PROPERTIES_H diff --git a/libcudacxx/include/cuda/__memory_resource/resource.h b/libcudacxx/include/cuda/__memory_resource/resource.h index 733a8fdde8b..b5a93943774 100644 --- a/libcudacxx/include/cuda/__memory_resource/resource.h +++ b/libcudacxx/include/cuda/__memory_resource/resource.h @@ -21,7 +21,7 @@ # pragma system_header #endif // no system header -#if !_CCCL_COMPILER(MSVC2017) && defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) +#if defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) # include # include @@ -124,6 +124,6 @@ _LIBCUDACXX_END_NAMESPACE_CUDA_MR # endif // _CCCL_STD_VER >= 2014 -#endif // !_CCCL_COMPILER(MSVC2017) && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE +#endif // LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif //_CUDA__MEMORY_RESOURCE_RESOURCE_H diff --git a/libcudacxx/include/cuda/__memory_resource/resource_ref.h b/libcudacxx/include/cuda/__memory_resource/resource_ref.h index 24f0298ac56..494c59e9396 100644 --- a/libcudacxx/include/cuda/__memory_resource/resource_ref.h +++ b/libcudacxx/include/cuda/__memory_resource/resource_ref.h @@ -21,7 +21,7 @@ # pragma system_header #endif // no system header -#if !_CCCL_COMPILER(MSVC2017) && defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) +#if defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) # include # include @@ -648,6 +648,6 @@ _LIBCUDACXX_END_NAMESPACE_CUDA_MR # endif // _CCCL_STD_VER >= 2014 -#endif // !_CCCL_COMPILER(MSVC2017) && LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE +#endif // LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif //_CUDA__MEMORY_RESOURCE_RESOURCE_REF_H diff --git a/libcudacxx/include/cuda/std/__algorithm/iterator_operations.h b/libcudacxx/include/cuda/std/__algorithm/iterator_operations.h index be02de72b97..0d37e26352c 100644 --- a/libcudacxx/include/cuda/std/__algorithm/iterator_operations.h +++ b/libcudacxx/include/cuda/std/__algorithm/iterator_operations.h @@ -44,7 +44,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template struct _IterOps; -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 struct _RangeAlgPolicy {}; @@ -69,7 +69,7 @@ struct _IterOps<_RangeAlgPolicy> static constexpr auto __advance_to = _CUDA_VRANGES::advance; }; -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 struct _ClassicAlgPolicy {}; diff --git a/libcudacxx/include/cuda/std/__algorithm/ranges_iterator_concept.h b/libcudacxx/include/cuda/std/__algorithm/ranges_iterator_concept.h index 43e674b976f..30897909d60 100644 --- a/libcudacxx/include/cuda/std/__algorithm/ranges_iterator_concept.h +++ b/libcudacxx/include/cuda/std/__algorithm/ranges_iterator_concept.h @@ -24,7 +24,7 @@ #include #include -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 _LIBCUDACXX_BEGIN_NAMESPACE_RANGES @@ -60,6 +60,6 @@ using __iterator_concept = decltype(__get_iterator_concept<_Iter>()); _LIBCUDACXX_END_NAMESPACE_RANGES -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 #endif // _LIBCUDACXX___ALGORITHM_RANGES_ITERATOR_CONCEPT_H diff --git a/libcudacxx/include/cuda/std/__cccl/compiler.h b/libcudacxx/include/cuda/std/__cccl/compiler.h index 166450fd84e..bbfa9c2acca 100644 --- a/libcudacxx/include/cuda/std/__cccl/compiler.h +++ b/libcudacxx/include/cuda/std/__cccl/compiler.h @@ -53,11 +53,9 @@ #elif defined(__GNUC__) # define _CCCL_COMPILER_GCC _CCCL_COMPILER_MAKE_VERSION(__GNUC__, __GNUC_MINOR__) #elif defined(_MSC_VER) -# define _CCCL_COMPILER_MSVC _CCCL_COMPILER_MAKE_VERSION(_MSC_VER / 100, _MSC_VER % 100) -# define _CCCL_COMPILER_MSVC2017 (_CCCL_COMPILER_MSVC < _CCCL_COMPILER_MAKE_VERSION(19, 20)) -# if _CCCL_COMPILER_MSVC2017 && !defined(CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) -# pragma message( \ - "Support for the Visual Studio 2017 (MSC_VER < 1920) is deprecated and will eventually be removed. Define CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING to suppress this warning") +# define _CCCL_COMPILER_MSVC _CCCL_COMPILER_MAKE_VERSION(_MSC_VER / 100, _MSC_VER % 100) +# if (_CCCL_COMPILER_MSVC < _CCCL_COMPILER_MAKE_VERSION(19, 20)) +# error "Visual Studio 2017 (MSC_VER < 1920) and older are not supported by CCCL.") # endif # define _CCCL_COMPILER_MSVC2019 \ (_CCCL_COMPILER_MSVC >= _CCCL_COMPILER_MAKE_VERSION(19, 20) \ diff --git a/libcudacxx/include/cuda/std/__cccl/diagnostic.h b/libcudacxx/include/cuda/std/__cccl/diagnostic.h index acb9064493c..8fcda874ab8 100644 --- a/libcudacxx/include/cuda/std/__cccl/diagnostic.h +++ b/libcudacxx/include/cuda/std/__cccl/diagnostic.h @@ -106,13 +106,8 @@ # define _CCCL_NV_DIAG_SUPPRESS(_WARNING) _CCCL_PRAGMA(diagnostic push) _CCCL_PRAGMA(diag_suppress _WARNING) # define _CCCL_NV_DIAG_DEFAULT(_WARNING) _CCCL_PRAGMA(diagnostic pop) # else // ^^^ __NVCC_DIAG_PRAGMA_SUPPORT__ ^^^ / vvv !__NVCC_DIAG_PRAGMA_SUPPORT__ vvv -# if _CCCL_COMPILER(MSVC2017) || _CCCL_COMPILER(GCC) // these compilers have issues with restoring the warning -# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) _CCCL_PRAGMA(diag_suppress _WARNING) -# define _CCCL_NV_DIAG_DEFAULT(_WARNING) -# else // ^^^ _CCCL_COMPILER(MSVC2017) ^^^ / vvv !_CCCL_COMPILER(MSVC2017) vvv -# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) _CCCL_PRAGMA(diag_suppress _WARNING) -# define _CCCL_NV_DIAG_DEFAULT(_WARNING) _CCCL_PRAGMA(diag_default _WARNING) -# endif // !_CCCL_COMPILER(MSVC2017) +# define _CCCL_NV_DIAG_SUPPRESS(_WARNING) _CCCL_PRAGMA(diag_suppress _WARNING) +# define _CCCL_NV_DIAG_DEFAULT(_WARNING) _CCCL_PRAGMA(diag_default _WARNING) # endif // !__NVCC_DIAG_PRAGMA_SUPPORT__ #else // ^^^ _CCCL_HAS_CUDA_COMPILER ^^^ / vvv !_CCCL_HAS_CUDA_COMPILER vvv # define _CCCL_NV_DIAG_SUPPRESS(_WARNING) @@ -147,7 +142,7 @@ #endif // !_CCCL_COMPILER(MSVC) #ifndef _CCCL_HAS_NO_PRAGMA_PUSH_POP_MACRO -# if _CCCL_COMPILER(MSVC2017) || _CCCL_COMPILER(NVRTC) +# if _CCCL_COMPILER(NVRTC) # define _CCCL_HAS_NO_PRAGMA_PUSH_POP_MACRO # endif #endif // _CCCL_HAS_NO_PRAGMA_PUSH_POP_MACRO diff --git a/libcudacxx/include/cuda/std/__cccl/unreachable.h b/libcudacxx/include/cuda/std/__cccl/unreachable.h index c80ea5ec697..e7a7961b37b 100644 --- a/libcudacxx/include/cuda/std/__cccl/unreachable.h +++ b/libcudacxx/include/cuda/std/__cccl/unreachable.h @@ -35,14 +35,7 @@ # define _CCCL_UNREACHABLE() __builtin_unreachable() # endif // CUDACC above 11.4 #else // ^^^ __CUDA_ARCH__ ^^^ / vvv !__CUDA_ARCH__ vvv -# if _CCCL_COMPILER(MSVC2017) -template -_LIBCUDACXX_HIDE_FROM_ABI __declspec(noreturn) void __cccl_unreachable_fallback() -{ - __assume(0); -} -# define _CCCL_UNREACHABLE() __cccl_unreachable_fallback() -# elif _CCCL_COMPILER(MSVC) +# if _CCCL_COMPILER(MSVC) # define _CCCL_UNREACHABLE() __assume(0) # else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv # define _CCCL_UNREACHABLE() __builtin_unreachable() diff --git a/libcudacxx/include/cuda/std/__fwd/get.h b/libcudacxx/include/cuda/std/__fwd/get.h index 70607edc813..1cfc369f344 100644 --- a/libcudacxx/include/cuda/std/__fwd/get.h +++ b/libcudacxx/include/cuda/std/__fwd/get.h @@ -85,7 +85,7 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr const _Tp&& get(const complex<_Tp>&&) noexce _LIBCUDACXX_END_NAMESPACE_STD -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 _LIBCUDACXX_BEGIN_NAMESPACE_RANGES @@ -122,6 +122,6 @@ using _CUDA_VRANGES::get; _LIBCUDACXX_END_NAMESPACE_STD -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 #endif // _LIBCUDACXX___FWD_GET_H diff --git a/libcudacxx/include/cuda/std/__fwd/subrange.h b/libcudacxx/include/cuda/std/__fwd/subrange.h index d89df6f0ab2..3e696fd51e7 100644 --- a/libcudacxx/include/cuda/std/__fwd/subrange.h +++ b/libcudacxx/include/cuda/std/__fwd/subrange.h @@ -22,7 +22,7 @@ #include -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 _LIBCUDACXX_BEGIN_NAMESPACE_RANGES @@ -52,6 +52,6 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT subrange; _LIBCUDACXX_END_NAMESPACE_RANGES_ABI _LIBCUDACXX_END_NAMESPACE_RANGES -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 #endif // _LIBCUDACXX___FWD_SUBRANGE_H diff --git a/libcudacxx/include/cuda/std/__iterator/concepts.h b/libcudacxx/include/cuda/std/__iterator/concepts.h index bd24b7e3803..22c657e5abe 100644 --- a/libcudacxx/include/cuda/std/__iterator/concepts.h +++ b/libcudacxx/include/cuda/std/__iterator/concepts.h @@ -403,19 +403,7 @@ template _CCCL_CONCEPT bidirectional_iterator = _CCCL_FRAGMENT(__bidirectional_iterator_, _Ip); // [iterator.concept.random.access] -# if _CCCL_COMPILER(MSVC2017) -// For whatever reasons MSVC2017 cannot check decltype(__n + __j) -template -_CCCL_CONCEPT_FRAGMENT( - __random_access_iterator_operations_, - requires(_Ip __i, const _Ip __j, const iter_difference_t<_Ip> __n)( - requires(same_as<_Ip&, decltype(__i += __n)>), - requires(same_as<_Ip, decltype(__j + __n)>), - typename(decltype(__n + __j)), - requires(same_as<_Ip&, decltype(__i -= __n)>), - requires(same_as<_Ip, decltype(__j - __n)>), - requires(same_as, decltype(__j[__n])>))); -# else // ^^^ _CCCL_COMPILER(MSVC2017) ^^^ / vvv !_CCCL_COMPILER(MSVC2017) vvv + template _CCCL_CONCEPT_FRAGMENT( __random_access_iterator_operations_, @@ -426,7 +414,7 @@ _CCCL_CONCEPT_FRAGMENT( requires(same_as<_Ip&, decltype(__i -= __n)>), requires(same_as<_Ip, decltype(__j - __n)>), requires(same_as, decltype(__j[__n])>))); -# endif // !_CCCL_COMPILER(MSVC2017) + template _CCCL_CONCEPT __random_access_iterator_operations = _CCCL_FRAGMENT(__random_access_iterator_operations_, _Ip); diff --git a/libcudacxx/include/cuda/std/__iterator/distance.h b/libcudacxx/include/cuda/std/__iterator/distance.h index 441c30c9a9f..7472abd6382 100644 --- a/libcudacxx/include/cuda/std/__iterator/distance.h +++ b/libcudacxx/include/cuda/std/__iterator/distance.h @@ -59,7 +59,7 @@ distance(_InputIter __first, _InputIter __last) } _LIBCUDACXX_END_NAMESPACE_STD -#if _CCCL_STD_VER > 2014 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER > 2014 // [range.iter.op.distance] @@ -118,6 +118,6 @@ _CCCL_GLOBAL_CONSTANT auto distance = __distance::__fn{}; } // namespace __cpo _LIBCUDACXX_END_NAMESPACE_RANGES -#endif // _CCCL_STD_VER > 2014 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER > 2014 #endif // _LIBCUDACXX___ITERATOR_DISTANCE_H diff --git a/libcudacxx/include/cuda/std/__iterator/move_iterator.h b/libcudacxx/include/cuda/std/__iterator/move_iterator.h index 7d7c5b3a600..45957634e84 100644 --- a/libcudacxx/include/cuda/std/__iterator/move_iterator.h +++ b/libcudacxx/include/cuda/std/__iterator/move_iterator.h @@ -107,7 +107,6 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT move_iterator _Iter __current_; #if _CCCL_STD_VER >= 2017 -# if !_CCCL_COMPILER(MSVC2017) _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __mi_get_iter_concept() { if constexpr (random_access_iterator<_Iter>) @@ -128,22 +127,12 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT move_iterator } _CCCL_UNREACHABLE(); } -# endif // !_CCCL_COMPILER(MSVC2017) #endif // _CCCL_STD_VER >= 2017 public: #if _CCCL_STD_VER > 2014 - using iterator_type = _Iter; -# if _CCCL_COMPILER(MSVC2017) - // clang-format off - using iterator_concept = conditional_t, random_access_iterator_tag, - conditional_t, bidirectional_iterator_tag, - conditional_t, forward_iterator_tag, - input_iterator_tag>>>; - // clang-format on -# else // ^^^ _CCCL_COMPILER(MSVC2017) ^^^ / vvv !_CCCL_COMPILER(MSVC2017) vvv + using iterator_type = _Iter; using iterator_concept = decltype(__mi_get_iter_concept()); -# endif // !_CCCL_COMPILER(MSVC2017) // iterator_category is inherited and not always present using value_type = iter_value_t<_Iter>; @@ -370,15 +359,6 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT move_iterator return _CUDA_VRANGES::iter_move(__i.__current_); } -# if _CCCL_COMPILER(MSVC2017) // MSVC2017 cannot find _Iter otherwise - template - _LIBCUDACXX_HIDE_FROM_ABI friend constexpr auto iter_swap( - const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) noexcept(__noexcept_swappable<_Iter1, _Iter2>) - _CCCL_TRAILING_REQUIRES(void)(same_as<_Iter1, _Iter>&& indirectly_swappable<_Iter2, _Iter1>) - { - return _CUDA_VRANGES::iter_swap(__x.__current_, __y.__current_); - } -# else // ^^^ _CCCL_COMPILER(MSVC2017) ^^^ / vvv !_CCCL_COMPILER(MSVC2017) vvv template _LIBCUDACXX_HIDE_FROM_ABI friend constexpr auto iter_swap(const move_iterator& __x, const move_iterator<_Iter2>& __y) noexcept(__noexcept_swappable<_Iter, _Iter2>) @@ -386,7 +366,6 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT move_iterator { return _CUDA_VRANGES::iter_swap(__x.__current_, __y.__current_); } -# endif // !_CCCL_COMPILER(MSVC2017) #endif // _CCCL_STD_VER > 2014 }; _LIBCUDACXX_CTAD_SUPPORTED_FOR_TYPE(move_iterator); diff --git a/libcudacxx/include/cuda/std/__iterator/next.h b/libcudacxx/include/cuda/std/__iterator/next.h index f100e76ec9d..5fbd7ecfcf5 100644 --- a/libcudacxx/include/cuda/std/__iterator/next.h +++ b/libcudacxx/include/cuda/std/__iterator/next.h @@ -42,7 +42,7 @@ next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = _LIBCUDACXX_END_NAMESPACE_STD -#if _CCCL_STD_VER > 2014 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER > 2014 // [range.iter.op.next] @@ -90,6 +90,6 @@ _CCCL_GLOBAL_CONSTANT auto next = __next::__fn{}; } // namespace __cpo _LIBCUDACXX_END_NAMESPACE_RANGES -#endif // _CCCL_STD_VER > 2014 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER > 2014 #endif // _LIBCUDACXX___ITERATOR_NEXT_H diff --git a/libcudacxx/include/cuda/std/__iterator/prev.h b/libcudacxx/include/cuda/std/__iterator/prev.h index 1e5e78d043e..3fd2e4ca271 100644 --- a/libcudacxx/include/cuda/std/__iterator/prev.h +++ b/libcudacxx/include/cuda/std/__iterator/prev.h @@ -41,7 +41,7 @@ prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = _LIBCUDACXX_END_NAMESPACE_STD -#if _CCCL_STD_VER > 2014 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER > 2014 // [range.iter.op.prev] @@ -81,6 +81,6 @@ _CCCL_GLOBAL_CONSTANT auto prev = __prev::__fn{}; } // namespace __cpo _LIBCUDACXX_END_NAMESPACE_RANGES -#endif // _CCCL_STD_VER > 2014 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER > 2014 #endif // _LIBCUDACXX___ITERATOR_PREV_H diff --git a/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h b/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h index 502f090afff..344a7b31ac5 100644 --- a/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h +++ b/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h @@ -248,18 +248,6 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT reverse_iterator return _CUDA_VRANGES::iter_move(--__tmp); } -# if _CCCL_COMPILER(MSVC2017) // MSVC2017 cannot find _Iter otherwise - template - _LIBCUDACXX_HIDE_FROM_ABI friend constexpr auto - iter_swap(const reverse_iterator<_Iter1>& __x, - const reverse_iterator<_Iter2>& __y) noexcept(__noexcept_rev_iter_iter_swap<_Iter1, _Iter2>) - _CCCL_TRAILING_REQUIRES(void)(same_as<_Iter1, _Iter>&& indirectly_swappable<_Iter2, _Iter1>) - { - auto __xtmp = __x.base(); - auto __ytmp = __y.base(); - _CUDA_VRANGES::iter_swap(--__xtmp, --__ytmp); - } -# else // ^^^ _CCCL_COMPILER(MSVC2017) ^^^ / vvv !_CCCL_COMPILER(MSVC2017) vvv template _LIBCUDACXX_HIDE_FROM_ABI friend constexpr auto iter_swap(const reverse_iterator& __x, @@ -270,7 +258,6 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT reverse_iterator auto __ytmp = __y.base(); return _CUDA_VRANGES::iter_swap(--__xtmp, --__ytmp); } -# endif // !_CCCL_COMPILER(MSVC2017) #endif // _CCCL_STD_VER > 2014 }; diff --git a/libcudacxx/include/cuda/std/__ranges/empty.h b/libcudacxx/include/cuda/std/__ranges/empty.h index 1494c18882f..ef967d64315 100644 --- a/libcudacxx/include/cuda/std/__ranges/empty.h +++ b/libcudacxx/include/cuda/std/__ranges/empty.h @@ -27,7 +27,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 // [range.prim.empty] @@ -104,7 +104,7 @@ inline namespace __cpo _CCCL_GLOBAL_CONSTANT auto empty = __empty::__fn{}; } // namespace __cpo -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 _LIBCUDACXX_END_NAMESPACE_RANGES diff --git a/libcudacxx/include/cuda/std/__ranges/empty_view.h b/libcudacxx/include/cuda/std/__ranges/empty_view.h index a1a90e7f197..1e75509dfce 100644 --- a/libcudacxx/include/cuda/std/__ranges/empty_view.h +++ b/libcudacxx/include/cuda/std/__ranges/empty_view.h @@ -24,7 +24,7 @@ #include #include -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 _LIBCUDACXX_BEGIN_NAMESPACE_RANGES _LIBCUDACXX_BEGIN_NAMESPACE_RANGES_ABI diff --git a/libcudacxx/include/cuda/std/__ranges/rbegin.h b/libcudacxx/include/cuda/std/__ranges/rbegin.h index 13cf76b9da9..093686bc9b6 100644 --- a/libcudacxx/include/cuda/std/__ranges/rbegin.h +++ b/libcudacxx/include/cuda/std/__ranges/rbegin.h @@ -33,7 +33,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 // [ranges.access.rbegin] @@ -168,7 +168,7 @@ inline namespace __cpo _CCCL_GLOBAL_CONSTANT auto crbegin = __crbegin::__fn{}; } // namespace __cpo -#endif // _CCCL_STD_VER >= 2017 && && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 _LIBCUDACXX_END_NAMESPACE_RANGES diff --git a/libcudacxx/include/cuda/std/__ranges/rend.h b/libcudacxx/include/cuda/std/__ranges/rend.h index 42a3c37054f..00e257b290a 100644 --- a/libcudacxx/include/cuda/std/__ranges/rend.h +++ b/libcudacxx/include/cuda/std/__ranges/rend.h @@ -34,7 +34,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 // [range.access.rend] @@ -175,7 +175,7 @@ inline namespace __cpo _CCCL_GLOBAL_CONSTANT auto crend = __crend::__fn{}; } // namespace __cpo -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 _LIBCUDACXX_END_NAMESPACE_RANGES diff --git a/libcudacxx/include/cuda/std/__ranges/subrange.h b/libcudacxx/include/cuda/std/__ranges/subrange.h index 28da5c75774..dc83a9dd908 100644 --- a/libcudacxx/include/cuda/std/__ranges/subrange.h +++ b/libcudacxx/include/cuda/std/__ranges/subrange.h @@ -51,7 +51,7 @@ #include #include -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 // MSVC complains about [[msvc::no_unique_address]] prior to C++20 as a vendor extension _CCCL_DIAG_PUSH @@ -515,6 +515,6 @@ _LIBCUDACXX_END_NAMESPACE_STD _CCCL_DIAG_POP -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 #endif // _LIBCUDACXX___RANGES_SUBRANGE_H diff --git a/libcudacxx/include/cuda/std/__ranges/unwrap_end.h b/libcudacxx/include/cuda/std/__ranges/unwrap_end.h index 9e0b6636ff0..dd86abc5dd3 100644 --- a/libcudacxx/include/cuda/std/__ranges/unwrap_end.h +++ b/libcudacxx/include/cuda/std/__ranges/unwrap_end.h @@ -27,7 +27,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES(forward_range<_Range>) @@ -46,7 +46,7 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator_t<_Range> __unwrap_ _CCCL_UNREACHABLE(); } -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 _LIBCUDACXX_END_NAMESPACE_RANGES diff --git a/libcudacxx/include/cuda/std/__ranges/view_interface.h b/libcudacxx/include/cuda/std/__ranges/view_interface.h index a5055867542..278bf89fb6b 100644 --- a/libcudacxx/include/cuda/std/__ranges/view_interface.h +++ b/libcudacxx/include/cuda/std/__ranges/view_interface.h @@ -37,7 +37,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_RANGES -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 # if !defined(_CCCL_NO_CONCEPTS) template @@ -178,7 +178,7 @@ class view_interface _LIBCUDACXX_END_NAMESPACE_RANGES_ABI -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 _LIBCUDACXX_END_NAMESPACE_RANGES diff --git a/libcudacxx/include/cuda/std/__tuple_dir/structured_bindings.h b/libcudacxx/include/cuda/std/__tuple_dir/structured_bindings.h index 2652536435d..a41d706a72b 100644 --- a/libcudacxx/include/cuda/std/__tuple_dir/structured_bindings.h +++ b/libcudacxx/include/cuda/std/__tuple_dir/structured_bindings.h @@ -166,7 +166,6 @@ struct tuple_element<_Ip, const volatile _CUDA_VSTD::tuple<_Tp...>> : _CUDA_VSTD::tuple_element<_Ip, const volatile _CUDA_VSTD::tuple<_Tp...>> {}; -# if !_CCCL_COMPILER(MSVC2017) template struct tuple_size<_CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> : _CUDA_VSTD::tuple_size<_CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> @@ -206,7 +205,6 @@ template struct tuple_element<_Idx, const volatile _CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> : _CUDA_VSTD::tuple_element<_Idx, const volatile _CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> {}; -# endif // !_CCCL_COMPILER(MSVC2017) } // namespace std #endif // _CCCL_STD_VER >= 2017 diff --git a/libcudacxx/include/cuda/std/__tuple_dir/tuple_like.h b/libcudacxx/include/cuda/std/__tuple_dir/tuple_like.h index d9f30347dde..3af431fb870 100644 --- a/libcudacxx/include/cuda/std/__tuple_dir/tuple_like.h +++ b/libcudacxx/include/cuda/std/__tuple_dir/tuple_like.h @@ -61,11 +61,11 @@ template struct __tuple_like> : true_type {}; -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2017 template struct __tuple_like<_CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> : true_type {}; -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2017 template struct __tuple_like<__tuple_types<_Tp...>> : true_type diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/span b/libcudacxx/include/cuda/std/detail/libcxx/include/span index b4e8fb04d95..36f07fb6f79 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/span +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/span @@ -203,7 +203,6 @@ _CCCL_INLINE_VAR constexpr bool __is_std_span> = true; template _CCCL_CONCEPT __span_array_convertible = _CCCL_TRAIT(is_convertible, _From (*)[], _To (*)[]); -# if !_CCCL_COMPILER(MSVC2017) template _CCCL_CONCEPT_FRAGMENT( __span_compatible_range_, @@ -219,35 +218,6 @@ _CCCL_CONCEPT_FRAGMENT( template _CCCL_CONCEPT __span_compatible_range = _CCCL_FRAGMENT(__span_compatible_range_, _Range, _ElementType); -# else // // ^^^ !_CCCL_COMPILER(MSVC2017) ^^^ / vvv _CCCL_COMPILER(MSVC2017) vvv - -template -_CCCL_INLINE_VAR constexpr bool __span_compatible_range = false; - -template -_CCCL_INLINE_VAR constexpr bool __span_compatible_range< - _Range, - _ElementType, - void_t< - // // is a contiguous range - // enable_if_t<_CUDA_VRANGES::contiguous_range<_Range>, nullptr_t>, - // // is a sized range - // enable_if_t<_CUDA_VRANGES::sized_range<_Range>, nullptr_t>, - // // is a borrowed range or ElementType is const - // enable_if_t<(_CUDA_VRANGES::borrowed_range<_Range> || _CCCL_TRAIT(is_const, _ElementType)), nullptr_t>, - // is not a C-style array - enable_if_t), nullptr_t>, - // is not a specialization of span - enable_if_t>, nullptr_t>, - // is not a specialization of array - enable_if_t>, nullptr_t>, - // remove_pointer_t(*)[] is convertible to ElementType(*)[] - enable_if_t<_CCCL_TRAIT(is_convertible, - remove_pointer_t()))> (*)[], - _ElementType (*)[]), - nullptr_t>>> = true; -# endif // _CCCL_COMPILER(MSVC2017) - # if _CCCL_STD_VER >= 2020 template _CCCL_CONCEPT __span_compatible_iterator = @@ -361,7 +331,7 @@ public: "invalid range in span's constructor (iterator, sentinel): last - first != extent"); } -# if _CCCL_COMPILER(NVRTC) || _CCCL_COMPILER(MSVC2017) +# if _CCCL_COMPILER(NVRTC) template = 0> _LIBCUDACXX_HIDE_FROM_ABI constexpr span(type_identity_t (&__arr)[_Sz]) noexcept : __data_{__arr} @@ -370,7 +340,7 @@ public: _LIBCUDACXX_HIDE_FROM_ABI constexpr span(type_identity_t (&__arr)[_Extent]) noexcept : __data_{__arr} {} -# endif // !_CCCL_COMPILER(NVRTC) && !_CCCL_COMPILER(MSVC2017) +# endif // !_CCCL_COMPILER(NVRTC) _CCCL_TEMPLATE(class _OtherElementType) _CCCL_REQUIRES(__span_array_convertible<_OtherElementType, element_type>) @@ -796,7 +766,7 @@ _CCCL_HOST_DEVICE span(_Range&&) -> span= 2014 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2014 _LIBCUDACXX_BEGIN_NAMESPACE_RANGES template _CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = true; @@ -804,6 +774,6 @@ _CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = true template _CCCL_INLINE_VAR constexpr bool enable_view> = true; _LIBCUDACXX_END_NAMESPACE_RANGES -#endif // _CCCL_STD_VER >= 2014 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2014 #endif // _LIBCUDACXX_SPAN diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/variant b/libcudacxx/include/cuda/std/detail/libcxx/include/variant index 0f6ec9d29fc..cfb0f34eea1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/variant +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/variant @@ -293,7 +293,7 @@ _LIBCUDACXX_END_NAMESPACE_STD_NOVERSION #endif // !_CCCL_NO_EXCEPTIONS -#if _CCCL_STD_VER >= 2014 && !_CCCL_COMPILER(MSVC2017) +#if _CCCL_STD_VER >= 2014 _LIBCUDACXX_BEGIN_NAMESPACE_STD @@ -2152,6 +2152,6 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr auto&& __unchecked_get(variant<_Types...>& _ _LIBCUDACXX_END_NAMESPACE_STD -#endif // _CCCL_STD_VER >= 2014 && !_CCCL_COMPILER(MSVC2017) +#endif // _CCCL_STD_VER >= 2014 #endif // _LIBCUDACXX_VARIANT diff --git a/libcudacxx/include/cuda/std/inplace_vector b/libcudacxx/include/cuda/std/inplace_vector index 5137fce4209..c395e965400 100644 --- a/libcudacxx/include/cuda/std/inplace_vector +++ b/libcudacxx/include/cuda/std/inplace_vector @@ -315,11 +315,7 @@ protected: iterator __curr = __dest; for (; __first != __last; ++__curr, (void) ++__first) { -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) ::new (_CUDA_VSTD::__voidify(*__curr)) _Tp(_CUDA_VRANGES::iter_move(__first)); -# else // ^^^ C++17 ^^^ / vvv C++14 vvv - ::new (_CUDA_VSTD::__voidify(*__curr)) _Tp(_CUDA_VSTD::move(*__first)); -# endif // _CCCL_STD_VER <= 2014 || _CCCL_COMPILER(MSVC2017) } this->__size_ += static_cast<__size_type>(__curr - __dest); } @@ -332,11 +328,7 @@ protected: auto __guard = __make_exception_guard(_Rollback_change_size<__inplace_vector_storage>{this, __dest, __curr}); for (; __first != __last; ++__curr, (void) ++__first) { -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) ::new (_CUDA_VSTD::__voidify(*__curr)) _Tp(_CUDA_VRANGES::iter_move(__first)); -# else // ^^^ C++17 ^^^ / vvv C++14 vvv - ::new (_CUDA_VSTD::__voidify(*__curr)) _Tp(_CUDA_VSTD::move(*__first)); -# endif // _CCCL_STD_VER <= 2014 || _CCCL_COMPILER(MSVC2017) } __guard.__complete(); this->__size_ += static_cast<__size_type>(__curr - __dest); @@ -590,22 +582,14 @@ protected: _LIBCUDACXX_HIDE_FROM_ABI constexpr void __uninitialized_copy(_Iter __first, _Iter __last, iterator __dest) noexcept { _CUDA_VSTD::copy(__first, __last, __dest); -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) __size_ += static_cast<__size_type>(_CUDA_VRANGES::distance(__first, __last)); -# else // ^^^ C++17 ^^^ / vvv C++14 vvv - __size_ += static_cast<__size_type>(_CUDA_VSTD::distance(__first, __last)); -# endif // _CCCL_STD_VER <= 2014 || _CCCL_COMPILER(MSVC2017) } template _LIBCUDACXX_HIDE_FROM_ABI constexpr void __uninitialized_move(_Iter __first, _Iter __last, iterator __dest) noexcept { _CUDA_VSTD::copy(__first, __last, __dest); -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) __size_ += static_cast<__size_type>(_CUDA_VRANGES::distance(__first, __last)); -# else // ^^^ C++17 ^^^ / vvv C++14 vvv - __size_ += static_cast<__size_type>(_CUDA_VSTD::distance(__first, __last)); -# endif // _CCCL_STD_VER <= 2014 || _CCCL_COMPILER(MSVC2017) } }; @@ -800,7 +784,6 @@ public: } } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES( _CUDA_VRANGES::__container_compatible_range<_Range, _Tp> _CCCL_AND(!_CUDA_VRANGES::forward_range<_Range>)) @@ -851,7 +834,6 @@ public: this->__uninitialized_move(_CUDA_VRANGES::begin(__range), _CUDA_VRANGES::__unwrap_end(__range), this->begin()); } } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _LIBCUDACXX_HIDE_FROM_ABI constexpr inplace_vector& operator=(initializer_list<_Tp> __ilist) { @@ -961,7 +943,6 @@ public: } } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES( _CUDA_VRANGES::__container_compatible_range<_Range, _Tp> _CCCL_AND(!_CUDA_VRANGES::forward_range<_Range>)) @@ -1037,7 +1018,6 @@ public: this->__uninitialized_copy(__middle, __last, this->end()); } } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) // [containers.sequences.inplace.vector.access], element access _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr reference at(const size_type __pos) @@ -1307,7 +1287,6 @@ public: return __res; } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES( _CUDA_VRANGES::__container_compatible_range<_Range, _Tp> _CCCL_AND(!_CUDA_VRANGES::forward_range<_Range>)) @@ -1355,7 +1334,6 @@ public: auto __first = _CUDA_VRANGES::begin(__range); insert(this->end(), __first, _CUDA_VRANGES::__unwrap_end(__range)); } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) template _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator emplace(const_iterator __cpos, _Args&&... __args) @@ -1451,7 +1429,6 @@ public: return _CUDA_VSTD::addressof(this->unchecked_emplace_back(_CUDA_VSTD::move(__value))); } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES( _CUDA_VRANGES::__container_compatible_range<_Range, _Tp> _CCCL_AND(!_CUDA_VRANGES::forward_range<_Range>)) @@ -1498,7 +1475,6 @@ public: this->__uninitialized_move(__first, __middle, this->end()); return __middle; } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) using __base::unchecked_emplace_back; @@ -1786,7 +1762,6 @@ public: } } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES(_CUDA_VRANGES::__container_compatible_range<_Range, _Tp>) _LIBCUDACXX_HIDE_FROM_ABI constexpr inplace_vector(from_range_t, _Range&& __range) @@ -1797,7 +1772,6 @@ public: _CUDA_VSTD::__throw_bad_alloc(); } } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _LIBCUDACXX_HIDE_FROM_ABI constexpr inplace_vector& operator=(initializer_list<_Tp> __ilist) { @@ -1838,7 +1812,6 @@ public: return; } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES(_CUDA_VRANGES::__container_compatible_range<_Range, _Tp>) _LIBCUDACXX_HIDE_FROM_ABI constexpr void assign_range(_Range&& __range) @@ -1849,7 +1822,6 @@ public: } return; } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) // [containers.sequences.inplace.vector.access], element access _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr reference at(const size_type __pos) @@ -1996,7 +1968,6 @@ public: return nullptr; } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES(_CUDA_VRANGES::__container_compatible_range<_Range, _Tp>) _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator insert_range(const_iterator __cpos, _Range&& __range) @@ -2017,7 +1988,6 @@ public: _CUDA_VSTD::__throw_bad_alloc(); } } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) template _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator emplace(const_iterator, _Args&&...) @@ -2061,14 +2031,12 @@ public: return nullptr; } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES(_CUDA_VRANGES::__container_compatible_range<_Range, _Tp>) _LIBCUDACXX_HIDE_FROM_ABI constexpr _CUDA_VRANGES::iterator_t<_Range> try_append_range(_Range&& __range) noexcept { return _CUDA_VRANGES::begin(__range); } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) using __base::unchecked_emplace_back; diff --git a/libcudacxx/test/internal_headers/CMakeLists.txt b/libcudacxx/test/internal_headers/CMakeLists.txt index 0129b5540ad..f6aa9f10338 100644 --- a/libcudacxx/test/internal_headers/CMakeLists.txt +++ b/libcudacxx/test/internal_headers/CMakeLists.txt @@ -63,9 +63,6 @@ function(libcudacxx_create_internal_header_test header_name, headertest_src, fal target_compile_definitions(headertest_${header_name} PRIVATE "-D${fallback}") endif() target_compile_definitions(headertest_${header_name} PRIVATE "-DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE") - if (CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) - target_compile_definitions(headertest_${header_name} PRIVATE CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) - endif() add_dependencies(libcudacxx.test.internal_headers headertest_${header_name}) endfunction() diff --git a/libcudacxx/test/libcudacxx/CMakeLists.txt b/libcudacxx/test/libcudacxx/CMakeLists.txt index 2aad419a35f..f41ae696f13 100644 --- a/libcudacxx/test/libcudacxx/CMakeLists.txt +++ b/libcudacxx/test/libcudacxx/CMakeLists.txt @@ -59,10 +59,6 @@ if (MSVC) endif() endif() -if (CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) - string(APPEND LIBCUDACXX_TEST_COMPILER_FLAGS " -DCCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING") -endif() - if (${CMAKE_CUDA_COMPILER_ID} STREQUAL "Clang") string(APPEND LIBCUDACXX_TEST_COMPILER_FLAGS " ${CMAKE_CUDA_FLAGS}" diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.copy/indirectly_copyable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.copy/indirectly_copyable.compile.pass.cpp index 3f89e8b84fc..95715270201 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.copy/indirectly_copyable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.copy/indirectly_copyable.compile.pass.cpp @@ -61,12 +61,10 @@ static_assert(!cuda::std::indirectly_copyable, ""); static_assert(!cuda::std::indirectly_copyable, ""); // Can copy copy-only objects. -#ifndef TEST_COMPILER_MSVC_2017 // MSVC2017 has issues determining common_reference static_assert(cuda::std::indirectly_copyable, ""); static_assert(!cuda::std::indirectly_copyable, ""); static_assert(cuda::std::indirectly_copyable, ""); static_assert(!cuda::std::indirectly_copyable, ""); -#endif // TEST_COMPILER_MSVC_2017 template struct PointerTo @@ -75,7 +73,6 @@ struct PointerTo __host__ __device__ T& operator*() const; }; -#ifndef TEST_COMPILER_MSVC_2017 // MSVC2017 has issues determining common_reference // Can copy through a dereferenceable class. static_assert(cuda::std::indirectly_copyable>, ""); static_assert(!cuda::std::indirectly_copyable>, ""); @@ -84,7 +81,6 @@ static_assert(!cuda::std::indirectly_copyable, PointerTo>, ""); static_assert(cuda::std::indirectly_copyable, CopyOnly*>, ""); static_assert(cuda::std::indirectly_copyable, PointerTo>, ""); -#endif // TEST_COMPILER_MSVC_2017 int main(int, char**) { diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.move/indirectly_movable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.move/indirectly_movable.compile.pass.cpp index 93abbf6d635..d82a6c5138a 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.move/indirectly_movable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.move/indirectly_movable.compile.pass.cpp @@ -41,13 +41,11 @@ static_assert(!cuda::std::indirectly_movable, ""); static_assert(!cuda::std::indirectly_movable, ""); static_assert(!cuda::std::indirectly_movable, ""); -#ifndef TEST_COMPILER_MSVC_2017 // MSVC2017 has issues determining common_reference // Can move move-only objects. static_assert(cuda::std::indirectly_movable, ""); static_assert(!cuda::std::indirectly_movable, ""); static_assert(!cuda::std::indirectly_movable, ""); static_assert(!cuda::std::indirectly_movable, ""); -#endif // TEST_COMPILER_MSVC_2017 template struct PointerTo @@ -56,7 +54,6 @@ struct PointerTo __host__ __device__ T& operator*() const; }; -#ifndef TEST_COMPILER_MSVC_2017 // MSVC2017 has issues determining common_reference // Can copy through a dereferenceable class. static_assert(cuda::std::indirectly_movable>, ""); static_assert(!cuda::std::indirectly_movable>, ""); @@ -65,7 +62,6 @@ static_assert(!cuda::std::indirectly_copyable, PointerTo>, ""); static_assert(cuda::std::indirectly_movable, MoveOnly*>, ""); static_assert(cuda::std::indirectly_movable, PointerTo>, ""); -#endif // TEST_COMPILER_MSVC_2017 int main(int, char**) { diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.move/indirectly_movable_storable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.move/indirectly_movable_storable.compile.pass.cpp index f5da4b865d5..f8548ebf8b9 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.move/indirectly_movable_storable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/alg.req.ind.move/indirectly_movable_storable.compile.pass.cpp @@ -32,10 +32,8 @@ static_assert(!cuda::std::indirectly_movable_storable, ""); static_assert(!cuda::std::indirectly_movable_storable, ""); static_assert(cuda::std::indirectly_movable_storable, ""); static_assert(!cuda::std::indirectly_movable_storable, ""); -#ifndef TEST_COMPILER_MSVC_2017 // MSVC2017 has issues determining common_reference static_assert(cuda::std::indirectly_movable_storable, ""); static_assert(cuda::std::indirectly_movable_storable, PointerTo>, ""); -#endif // TEST_COMPILER_MSVC_2017 // The dereference operator returns a different type from `value_type` and the reference type cannot be assigned from a // `ValueType`. diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp index 7a43631d027..2fe0bc883e6 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp @@ -46,9 +46,7 @@ using NoexceptBase = MaybeNoexceptSwap; static_assert(cuda::std::input_iterator); ASSERT_NOT_NOEXCEPT( cuda::std::ranges::iter_swap(cuda::std::declval(), cuda::std::declval())); -#if !defined(TEST_COMPILER_MSVC_2017) // MSVC2017 gets confused by the two friends and only considers the first ASSERT_NOEXCEPT(cuda::std::ranges::iter_swap(cuda::std::declval(), cuda::std::declval())); -#endif // !TEST_COMPILER_MSVC_2017 __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { @@ -84,10 +82,8 @@ __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { using ThrowingIter = cuda::std::move_iterator; ASSERT_NOT_NOEXCEPT(iter_swap(cuda::std::declval(), cuda::std::declval())); -#if !defined(TEST_COMPILER_MSVC_2017) // MSVC2017 gets confused by the two friends and only considers the first using NoexceptIter = cuda::std::move_iterator; ASSERT_NOEXCEPT(iter_swap(cuda::std::declval(), cuda::std::declval())); -#endif // !TEST_COMPILER_MSVC_2017 } return true; diff --git a/libcudacxx/test/public_headers/CMakeLists.txt b/libcudacxx/test/public_headers/CMakeLists.txt index b0e48c19663..1156d1a8b75 100644 --- a/libcudacxx/test/public_headers/CMakeLists.txt +++ b/libcudacxx/test/public_headers/CMakeLists.txt @@ -46,9 +46,6 @@ function(libcudacxx_add_public_header_test header) PRIVATE ${headertest_warning_levels_device} -DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) - if (CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) - target_compile_definitions(headertest_${header_name} PRIVATE CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) - endif() target_compile_definitions(headertest_${header_name} PRIVATE CCCL_ENABLE_ASSERTIONS) target_compile_definitions(headertest_${header_name} PRIVATE CCCL_IGNORE_DEPRECATED_CPP_DIALECT) diff --git a/libcudacxx/test/public_headers_host_only/CMakeLists.txt b/libcudacxx/test/public_headers_host_only/CMakeLists.txt index f3de3e65f91..3d8f5528a9d 100644 --- a/libcudacxx/test/public_headers_host_only/CMakeLists.txt +++ b/libcudacxx/test/public_headers_host_only/CMakeLists.txt @@ -35,9 +35,6 @@ function(libcudacxx_add_std_header_test header) target_include_directories(headertest_std_${header_name} PRIVATE "${libcudacxx_SOURCE_DIR}/include") target_compile_options(headertest_std_${header_name} PRIVATE ${headertest_warning_levels_host}) target_compile_definitions(headertest_std_${header_name} PRIVATE CCCL_ENABLE_ASSERTIONS) - if (CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) - target_compile_definitions(headertest_std_${header_name} PRIVATE CCCL_SUPPRESS_MSVC2017_DEPRECATION_WARNING) - endif() target_compile_definitions(headertest_std_${header_name} PRIVATE CCCL_IGNORE_DEPRECATED_CPP_DIALECT) # We want to ensure that we can build headers within with a host compiler but we need cuda_runtime_api.h diff --git a/libcudacxx/test/support/test_iterators.h b/libcudacxx/test/support/test_iterators.h index 46ae88fa8a1..b2d29989edc 100644 --- a/libcudacxx/test/support/test_iterators.h +++ b/libcudacxx/test/support/test_iterators.h @@ -1096,10 +1096,9 @@ class cpp20_input_iterator : it_(it) {} -# ifndef TEST_COMPILER_MSVC_2017 // MSVC2017 has issues determining common_reference cpp20_input_iterator(cpp20_input_iterator&&) = default; cpp20_input_iterator& operator=(cpp20_input_iterator&&) = default; -# endif // !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_MSVC_2017 __host__ __device__ constexpr decltype(auto) operator*() const { @@ -1154,10 +1153,8 @@ class cpp20_output_iterator : it_(it) {} -# ifndef TEST_COMPILER_MSVC_2017 // MSVC2017 has issues determining common_reference cpp20_output_iterator(cpp20_output_iterator&&) = default; cpp20_output_iterator& operator=(cpp20_output_iterator&&) = default; -# endif // !TEST_COMPILER_MSVC_2017 __host__ __device__ constexpr decltype(auto) operator*() const { @@ -1211,14 +1208,14 @@ class stride_counting_iterator cuda::std::input_iterator_tag, /* else */ cuda::std::output_iterator_tag>>>>>; -# if TEST_STD_VER > 2017 +#if TEST_STD_VER > 2017 stride_counting_iterator() requires cuda::std::default_initializable = default; -# else +#else template , int> = 0> __host__ __device__ constexpr stride_counting_iterator() noexcept {}; -# endif +#endif __host__ __device__ constexpr explicit stride_counting_iterator(It const& it) : base_(base(it)) @@ -1342,13 +1339,13 @@ class stride_counting_iterator return It(base_) == It(other.base_); } -# if TEST_STD_VER < 2020 +#if TEST_STD_VER < 2020 template , int> = 0> __host__ __device__ constexpr bool operator!=(stride_counting_iterator const& other) const { return It(base_) != It(other.base_); } -# endif +#endif template , int> = 0> __host__ __device__ friend constexpr bool @@ -1399,7 +1396,7 @@ class sentinel_wrapper { return s.base_ == base(i); } -# if TEST_STD_VER < 2020 +#if TEST_STD_VER < 2020 __host__ __device__ friend constexpr bool operator==(const It& i, const sentinel_wrapper& s) { return s.base_ == base(i); @@ -1412,7 +1409,7 @@ class sentinel_wrapper { return s.base_ != base(i); } -# endif +#endif __host__ __device__ friend constexpr It base(const sentinel_wrapper& s) { return It(s.base_); @@ -1434,7 +1431,7 @@ class sized_sentinel { return s.base_ == base(i); } -# if TEST_STD_VER < 2020 +#if TEST_STD_VER < 2020 __host__ __device__ friend constexpr bool operator==(const It& i, const sized_sentinel& s) { return s.base_ == base(i); @@ -1447,7 +1444,7 @@ class sized_sentinel { return s.base_ != base(i); } -# endif +#endif __host__ __device__ friend constexpr auto operator-(const sized_sentinel& s, const It& i) { return s.base_ - base(i); @@ -1594,12 +1591,12 @@ class Iterator { return lhs.ptr_ == rhs.ptr_; } -# ifndef TEST_HAS_NO_SPACESHIP_OPERATOR +#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR __host__ __device__ constexpr friend auto operator<=>(const Iterator& lhs, const Iterator& rhs) { return lhs.ptr_ <=> rhs.ptr_; } -# else +#else __host__ __device__ constexpr friend bool operator!=(const Iterator& lhs, const Iterator& rhs) { return lhs.ptr_ != rhs.ptr_; @@ -1620,7 +1617,7 @@ class Iterator { return lhs.ptr_ >= rhs.ptr_; } -# endif // TEST_STD_VER < 2020 +#endif // TEST_STD_VER < 2020 }; } // namespace adl @@ -1696,9 +1693,9 @@ struct Proxy return *this; } -# if defined(TEST_COMPILER_MSVC) +#if defined(TEST_COMPILER_MSVC) TEST_NV_DIAG_SUPPRESS(1805) // MSVC complains that if we pass a pointer type, adding const is useless -# endif // TEST_COMPILER_MSVC +#endif // TEST_COMPILER_MSVC // const assignment required to make ProxyIterator model cuda::std::indirectly_writable _CCCL_TEMPLATE(class Other) @@ -1723,18 +1720,18 @@ struct Proxy // Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues) // Compare operators are defined for the convenience of the tests -# if TEST_STD_VER > 2017 +#if TEST_STD_VER > 2017 __host__ __device__ friend constexpr bool operator==(const Proxy&, const Proxy&) requires(cuda::std::equality_comparable && !cuda::std::is_reference_v) = default; -# else +#else _CCCL_TEMPLATE(class T2 = T) _CCCL_REQUIRES((cuda::std::equality_comparable && !cuda::std::is_reference_v) ) __host__ __device__ friend constexpr bool operator==(const Proxy& lhs, const Proxy& rhs) { return lhs.data == rhs.data; } -# endif // TEST_STD_VER > 2017 +#endif // TEST_STD_VER > 2017 // Helps compare e.g. `Proxy` and `Proxy`. Note that the default equality comparison operator is deleted // when `T` is a reference type. @@ -1745,7 +1742,7 @@ struct Proxy return lhs.data == rhs.data; } -# ifndef TEST_HAS_NO_SPACESHIP_OPERATOR +#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR __host__ __device__ friend constexpr auto operator<=>(const Proxy&, const Proxy&) requires(cuda::std::three_way_comparable && !cuda::std::is_reference_v) = default; @@ -1758,7 +1755,7 @@ struct Proxy { return lhs.data <=> rhs.data; } -# endif // TEST_HAS_NO_SPACESHIP_OPERATOR +#endif // TEST_HAS_NO_SPACESHIP_OPERATOR }; namespace cuda @@ -1830,14 +1827,14 @@ struct ProxyIterator : ProxyIteratorBase using value_type = Proxy>; using difference_type = cuda::std::iter_difference_t; -# if TEST_STD_VER > 2017 +#if TEST_STD_VER > 2017 ProxyIterator() requires cuda::std::default_initializable = default; -# else +#else template , int> = 0> __host__ __device__ constexpr ProxyIterator() noexcept {}; -# endif // TEST_STD_VER > 2017 +#endif // TEST_STD_VER > 2017 __host__ __device__ constexpr ProxyIterator(Base base) : base_{cuda::std::move(base)} @@ -1976,14 +1973,14 @@ struct ProxyIterator : ProxyIteratorBase return x.base_ >= y.base_; } -# ifndef TEST_HAS_NO_SPACESHIP_OPERATOR +#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR _CCCL_TEMPLATE(class B2 = Base) _CCCL_REQUIRES(cuda::std::random_access_iterator&& cuda::std::three_way_comparable) __host__ __device__ friend constexpr auto operator<=>(const ProxyIterator& x, const ProxyIterator& y) { return x.base_ <=> y.base_; } -# endif // TEST_HAS_NO_SPACESHIP_OPERATOR +#endif // TEST_HAS_NO_SPACESHIP_OPERATOR _CCCL_TEMPLATE(class B2 = Base) _CCCL_REQUIRES(cuda::std::random_access_iterator) @@ -2036,7 +2033,7 @@ struct ProxySentinel } }; -# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) +#if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) template requires cuda::std::ranges::view struct ProxyRange @@ -2069,7 +2066,7 @@ struct ProxyRange template requires cuda::std::ranges::viewable_range ProxyRange(R&&) -> ProxyRange>; -# endif // !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) +#endif // !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) #endif // TEST_STD_VER > 2014 diff --git a/libcudacxx/test/support/test_range.h b/libcudacxx/test/support/test_range.h index 83e8a25c425..29278893c92 100644 --- a/libcudacxx/test/support/test_range.h +++ b/libcudacxx/test/support/test_range.h @@ -105,11 +105,9 @@ _CCCL_INLINE_VAR constexpr bool enable_borrowed_range = true; static_assert(!cuda::std::ranges::view, ""); static_assert(cuda::std::ranges::borrowed_range, ""); -#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) using BorrowedView = cuda::std::ranges::empty_view; static_assert(cuda::std::ranges::view, ""); static_assert(cuda::std::ranges::borrowed_range, ""); -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) #if _LIBCUDACXX_HAS_RANGES using NonBorrowedView = cuda::std::ranges::single_view; diff --git a/thrust/testing/cuda/transform.cu b/thrust/testing/cuda/transform.cu index 594194cd183..df8f910862e 100644 --- a/thrust/testing/cuda/transform.cu +++ b/thrust/testing/cuda/transform.cu @@ -354,8 +354,6 @@ struct sum_five } }; -// The following test cannot be compiled because of a bug in the conversion of thrust::tuple on MSVC 2017 -#if !_CCCL_COMPILER(MSVC2017) // we specialize zip_function for sum_five, but do nothing in the call operator so the test below would fail if the // zip_function is actually called (and not unwrapped) THRUST_NAMESPACE_BEGIN @@ -420,4 +418,3 @@ void TestTransformZipIteratorUnwrapping() } } DECLARE_UNITTEST(TestTransformZipIteratorUnwrapping); -#endif // !_CCCL_COMPILER(MSVC2017) diff --git a/thrust/thrust/detail/config/cpp_dialect.h b/thrust/thrust/detail/config/cpp_dialect.h index 29b9a473cc1..8fab1fc7b83 100644 --- a/thrust/thrust/detail/config/cpp_dialect.h +++ b/thrust/thrust/detail/config/cpp_dialect.h @@ -66,9 +66,6 @@ THRUST_COMPILER_DEPRECATION(Clang 7.0); # elif _CCCL_COMPILER(MSVC, <, 19, 10) // <2017. Hard upgrade message: THRUST_COMPILER_DEPRECATION(MSVC 2019(19.20 / 16.0 / 14.20)); -# elif _CCCL_COMPILER(MSVC2017) -// >=2017, <2019. Soft deprecation message: -THRUST_COMPILER_DEPRECATION_SOFT(MSVC 2019(19.20 / 16.0 / 14.20), MSVC 2017); # endif #endif // CCCL_IGNORE_DEPRECATED_COMPILER diff --git a/thrust/thrust/iterator/permutation_iterator.h b/thrust/thrust/iterator/permutation_iterator.h index 29f958a9b1a..fa0f452cfae 100644 --- a/thrust/thrust/iterator/permutation_iterator.h +++ b/thrust/thrust/iterator/permutation_iterator.h @@ -182,10 +182,6 @@ class _CCCL_DECLSPEC_EMPTY_BASES permutation_iterator return *(m_element_iterator + *this->base()); } -#if _CCCL_COMPILER(MSVC2017) - _CCCL_DIAG_POP -#endif // _CCCL_COMPILER(MSVC2017) - // make friends for the copy constructor template friend class permutation_iterator; diff --git a/thrust/thrust/iterator/reverse_iterator.h b/thrust/thrust/iterator/reverse_iterator.h index a3e6b737b68..43f12f4728e 100644 --- a/thrust/thrust/iterator/reverse_iterator.h +++ b/thrust/thrust/iterator/reverse_iterator.h @@ -163,11 +163,7 @@ class reverse_iterator : public detail::reverse_iterator_base Date: Mon, 27 Jan 2025 17:20:19 -0800 Subject: [PATCH 02/14] remove TEST_COMPILER_MSVC_2017 paths --- cub/cub/detail/nvtx3.hpp | 16 +---------- docs/libcudacxx/setup/requirements.rst | 2 +- .../standard_api/utility_library/tuple.rst | 3 +- lib/cmake/thrust/FindTBB.cmake | 2 -- .../include/cuda/std/__iterator/advance.h | 4 +-- .../alg.modifying/alg.copy/copy_if.pass.cpp | 4 --- .../binary.search/binary_search.pass.cpp | 3 -- .../binary.search/binary_search_comp.pass.cpp | 3 -- .../equal.range/equal_range.pass.cpp | 3 -- .../equal.range/equal_range_comp.pass.cpp | 4 --- .../lower.bound/lower_bound.pass.cpp | 3 -- .../lower.bound/lower_bound_comp.pass.cpp | 3 -- .../upper.bound/upper_bound.pass.cpp | 3 -- .../upper.bound/upper_bound_comp.pass.cpp | 3 -- .../alg.min.max/minmax_element.pass.cpp | 3 -- .../alg.min.max/minmax_element_comp.pass.cpp | 3 -- .../alg.min.max/minmax_init_list.pass.cpp | 3 -- .../minmax_init_list_comp.pass.cpp | 3 -- .../partial_sort_copy.pass.cpp | 3 -- .../partial_sort_copy_comp.pass.cpp | 3 -- .../invocable.compile.pass.cpp | 28 +++++++++---------- .../regular_invocable.compile.pass.cpp | 28 +++++++++---------- .../assignable_from.compile.pass.cpp | 7 ----- .../common_reference.compile.pass.cpp | 2 -- .../convertible_to.pass.cpp | 12 ++------ .../concept.swappable/swappable.pass.cpp | 22 +++------------ .../swappable_with.compile.pass.cpp | 8 ------ .../concepts.object/movable.compile.pass.cpp | 2 -- .../array/array.cons/implicit_copy.pass.cpp | 8 +----- .../array/array.creation/to_array.pass.cpp | 4 --- .../sequences/array/indexing_const.pass.cpp | 2 -- .../sequences/inplace_vector/assign.pass.cpp | 8 ------ .../sequences/inplace_vector/insert.pass.cpp | 6 ---- .../inplace_vector/properties.pass.cpp | 2 -- .../sequences/inplace_vector/swap.pass.cpp | 2 -- .../sequences/inplace_vector/types.h | 2 -- .../span.objectrep/as_bytes.pass.cpp | 6 ---- .../span.objectrep/as_writable_bytes.pass.cpp | 6 ---- .../indirectly_swappable.compile.pass.cpp | 4 +-- .../permutable.compile.pass.cpp | 4 +-- .../iter_difference_t.compile.pass.cpp | 2 -- .../readable.traits/iter_value_t.pass.cpp | 2 -- .../input_iterator.compile.pass.cpp | 2 -- .../contiguous_iterator.compile.pass.cpp | 2 -- .../random_access_iterator.compile.pass.cpp | 2 -- .../sentinel_for.compile.pass.cpp | 2 -- .../weakly_incrementable.compile.pass.cpp | 2 -- .../iterator.cust.swap/iter_swap.pass.cpp | 8 ------ .../move.iter.op.const/iter.pass.cpp | 2 -- .../move.iter.op.conv/base.pass.cpp | 2 -- ...rator_concept_conformance.compile.pass.cpp | 16 ----------- .../exclusive.scan/exclusive_scan.pass.cpp | 4 --- ...sform_exclusive_scan_init_bop_uop.pass.cpp | 4 --- .../assign/assign.unexpected.copy.pass.cpp | 4 --- .../assign/assign.unexpected.move.pass.cpp | 4 --- .../assign/assign.unexpected.move.pass.cpp | 4 --- .../func.bind_front/bind_front.pass.cpp | 8 ------ .../func.not_fn/not_fn.pass.cpp | 2 -- .../range.cmp/equal_to.pass.cpp | 2 -- .../range.cmp/greater.pass.cpp | 2 -- .../range.cmp/greater_equal.pass.cpp | 2 -- .../function.objects/range.cmp/less.pass.cpp | 2 -- .../range.cmp/less_equal.pass.cpp | 2 -- .../range.cmp/not_equal_to.pass.cpp | 2 -- .../const_pointer.pass.cpp | 4 --- .../const_void_pointer.pass.cpp | 4 --- .../difference_type.pass.cpp | 4 --- .../allocator.traits.types/pointer.pass.cpp | 4 --- ...gate_on_container_copy_assignment.pass.cpp | 4 --- ...gate_on_container_move_assignment.pass.cpp | 4 --- .../propagate_on_container_swap.pass.cpp | 4 --- .../rebind_alloc.pass.cpp | 4 --- .../allocator.traits.types/size_type.pass.cpp | 4 --- .../void_pointer.pass.cpp | 4 --- .../uses_allocator.pass.cpp | 8 +++--- .../construct_at.pass.cpp | 3 +- .../meta/meta.rel/is_convertible.pass.cpp | 14 +++++----- .../meta.rel/is_nothrow_invocable.pass.cpp | 4 --- .../meta.unary.prop/is_constructible.pass.cpp | 2 -- .../is_nothrow_default_constructible.pass.cpp | 2 -- .../utility/exchange/exchange.pass.cpp | 6 ++-- .../utility/utility.swap/swap_array.pass.cpp | 4 +-- libcudacxx/test/support/test_iterators.h | 3 -- libcudacxx/test/support/test_macros.h | 2 +- 84 files changed, 61 insertions(+), 348 deletions(-) diff --git a/cub/cub/detail/nvtx3.hpp b/cub/cub/detail/nvtx3.hpp index a2260dd90d8..008c039cd35 100644 --- a/cub/cub/detail/nvtx3.hpp +++ b/cub/cub/detail/nvtx3.hpp @@ -562,21 +562,7 @@ /* Temporary helper #defines, removed with #undef at end of header */ #if !defined(NVTX3_USE_CHECKED_OVERLOADS_FOR_GET) -# if defined(_MSC_VER) && _MSC_VER < 1914 -/* Microsoft's compiler prior to VS2017 Update 7 (15.7) uses an older parser - * that does not work with domain::get's specialization for domain::global, - * and would require extra conditions to make SFINAE work for the overloaded - * get() functions. This macro disables use of overloaded get() in order to - * work with VS2015 and versions of VS2017 below 15.7, without penalizing - * users of newer compilers. Building with this flag set to 0 means errors - * when defining tag structs (see documentation for domain, named_category, - * and registered_string) will have more complex compiler error messages - * instead of the clear static_assert messages from the get() overloads. - */ -# define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 0 -# else -# define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 1 -# endif +# define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET 1 # define NVTX3_USE_CHECKED_OVERLOADS_FOR_GET_DEFINED_HERE #endif diff --git a/docs/libcudacxx/setup/requirements.rst b/docs/libcudacxx/setup/requirements.rst index f8da901b096..ee5170d22ba 100644 --- a/docs/libcudacxx/setup/requirements.rst +++ b/docs/libcudacxx/setup/requirements.rst @@ -49,7 +49,7 @@ NVCC Host Compilers When used with NVCC, the NVIDIA C++ Standard Library supports the following host compilers: -- MSVC 2017 and 2019. +- MSVC 2019. - GCC 5, 6, 7, 8, 9, and 10. - Clang 7, 8, 9, and 10. - ICPC latest. diff --git a/docs/libcudacxx/standard_api/utility_library/tuple.rst b/docs/libcudacxx/standard_api/utility_library/tuple.rst index d70322f93ca..c107fa4de43 100644 --- a/docs/libcudacxx/standard_api/utility_library/tuple.rst +++ b/docs/libcudacxx/standard_api/utility_library/tuple.rst @@ -12,6 +12,5 @@ Before version 1.4.0, ``tuple`` is not available when using NVCC with MSVC as a host compiler, due to compiler bugs. Before version 2.3.0 internal compiler errors may be encountered when -using ``tuple`` with older updates of MSVC 2017 and MSVC 2019. For MSVC -2017, please use version 15.8 or later (``_MSC_VER >= 1915``). For MSVC +using ``tuple`` with older updates of MSVC 2019. For MSVC 2019, please use version 16.6 or later (``_MSC_VER >= 1926``). diff --git a/lib/cmake/thrust/FindTBB.cmake b/lib/cmake/thrust/FindTBB.cmake index 01e53d5e746..2a3adb2f382 100644 --- a/lib/cmake/thrust/FindTBB.cmake +++ b/lib/cmake/thrust/FindTBB.cmake @@ -238,8 +238,6 @@ if (WIN32 AND MSVC) set(COMPILER_PREFIX "vc12") elseif(MSVC_VERSION GREATER_EQUAL 1900 AND MSVC_VERSION LESS_EQUAL 1939) # 1900-1925 actually spans three Visual Studio versions: - # 1900 = VS 14.0 (v140 toolset) a.k.a. MSVC 2015 - # 1910-1919 = VS 15.0 (v141 toolset) a.k.a. MSVC 2017 # 1920-1929 = VS 16.0 (v142 toolset) a.k.a. MSVC 2019 # 1930-1939 = VS 17.0 (v143 toolset) a.k.a. MSVC 2022 # diff --git a/libcudacxx/include/cuda/std/__iterator/advance.h b/libcudacxx/include/cuda/std/__iterator/advance.h index 48359585167..30dd5ab42b1 100644 --- a/libcudacxx/include/cuda/std/__iterator/advance.h +++ b/libcudacxx/include/cuda/std/__iterator/advance.h @@ -83,7 +83,7 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 void advance(_InputIter& __i, _D _LIBCUDACXX_END_NAMESPACE_STD -#if _CCCL_STD_VER > 2014 && !defined(_LICBUDACXX_COMPILER_MSVC_2017) +#if _CCCL_STD_VER > 2014 // [range.iter.op.advance] @@ -238,6 +238,6 @@ _CCCL_GLOBAL_CONSTANT auto advance = __advance::__fn{}; _LIBCUDACXX_END_NAMESPACE_RANGES -#endif // _CCCL_STD_VER > 2014 && !_LICBUDACXX_COMPILER_MSVC_2017 +#endif // _CCCL_STD_VER > 2014 #endif // _LIBCUDACXX___ITERATOR_ADVANCE_H diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.modifying/alg.copy/copy_if.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.modifying/alg.copy/copy_if.pass.cpp index b980ebfa5a8..7e5046606c9 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.modifying/alg.copy/copy_if.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.modifying/alg.copy/copy_if.pass.cpp @@ -118,10 +118,6 @@ TEST_CONSTEXPR_CXX14 __host__ __device__ bool test() int main(int, char**) { test(); - -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp index 9e581415f07..875a6b3e23a 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp @@ -55,9 +55,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp index 1398a3eeed3..40201f727ee 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp @@ -55,9 +55,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp index 00eff10b723..8f99fcae6db 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp @@ -79,9 +79,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp index 4a2f68c95df..d1100d208fb 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp @@ -79,11 +79,7 @@ int main(int, char**) { test(); test(); - -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); static_assert(test(), ""); // clang otherwise hits the evaluation limit -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp index 1938f9247ef..4e0ef7bf3c5 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp @@ -69,9 +69,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp index f8baba96cd4..5118cb5cc3c 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp @@ -70,9 +70,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp index 681bf398e0b..fde22839f25 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp @@ -69,9 +69,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp index 38533d679e9..77fed82d259 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp @@ -70,9 +70,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp index deeb44a40ec..2ec531f62c0 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp @@ -78,9 +78,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp index 297c9097dba..de53f59763f 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp @@ -80,9 +80,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp index e1c63f4b7c9..69f64a8de0a 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp @@ -37,9 +37,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp index fa552d06400..225f7ee9816 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp @@ -79,9 +79,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp index c02f29f0178..669e3056cdb 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp @@ -99,9 +99,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && ! TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp index 2c0c210fb08..cc92e0bf3e7 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp @@ -105,9 +105,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && ! TEST_COMPILER_MSVC_2017 - return 0; } diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp index e8d8b89f72e..4edff4bfb3a 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp @@ -324,9 +324,9 @@ static_assert(invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(!invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); @@ -352,12 +352,12 @@ static_assert(invocable, ""); static_assert(!invocable, ""); static_assert(invocable, ""); static_assert(!invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) static_assert(check_member_is_invocable(), ""); using lvalue_cv_qualified = void (S::*)() const volatile&; @@ -365,34 +365,34 @@ static_assert(invocable, ""); static_assert(invocable, ""); static_assert(invocable, ""); static_assert(invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) using rvalue_unqualified = void (S::*)() &&; static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) using rvalue_const_unqualified = void (S::*)() const&&; static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(invocable, ""); static_assert(invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) static_assert(!invocable, ""); static_assert(!invocable, ""); @@ -401,24 +401,24 @@ static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(invocable, ""); static_assert(!invocable, ""); static_assert(invocable, ""); static_assert(!invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) using rvalue_cv_unqualified = void (S::*)() const volatile&&; static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); static_assert(!invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(invocable, ""); static_assert(invocable, ""); static_assert(invocable, ""); static_assert(invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) } // namespace pointer_to_member_functions // Check the concept with closure types diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp index 7eb07f9566c..5549cab9afe 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp @@ -324,12 +324,12 @@ static_assert(regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) #if TEST_STD_VER > 2017 static_assert(check_member_is_invocable(), ""); @@ -352,12 +352,12 @@ static_assert(regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(regular_invocable, ""); static_assert(!regular_invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) static_assert(check_member_is_invocable(), ""); using lvalue_cv_qualified = void (S::*)() const volatile&; @@ -365,60 +365,60 @@ static_assert(regular_invocable, ""); static_assert(regular_invocable, ""); static_assert(regular_invocable, ""); static_assert(regular_invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) using rvalue_unqualified = void (S::*)() &&; static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) using rvalue_const_unqualified = void (S::*)() const&&; static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(regular_invocable, ""); static_assert(regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) using rvalue_volatile_unqualified = void (S::*)() volatile&&; static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(regular_invocable, ""); static_assert(!regular_invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) using rvalue_cv_unqualified = void (S::*)() const volatile&&; static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); static_assert(!regular_invocable, ""); -#if !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#if !defined(TEST_COMPILER_MSVC_2019) static_assert(regular_invocable, ""); static_assert(regular_invocable, ""); static_assert(regular_invocable, ""); static_assert(regular_invocable, ""); -#endif // !defined(TEST_COMPILER_MSVC_2017) && !defined(TEST_COMPILER_MSVC_2019) +#endif // !defined(TEST_COMPILER_MSVC_2019) } // namespace pointer_to_member_functions // Check the concept with closure types (and also check for subsumption) diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp index 1fc4263a60b..7a689efb538 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp @@ -83,9 +83,6 @@ struct Locale static_assert(cuda::std::is_assignable_v, ""); static_assert(!cuda::std::assignable_from, ""); -#ifdef TEST_COMPILER_MSVC_2017 -# pragma warning(disable : 4522) // multiple assignment operators defined -#endif // TEST_COMPILER_MSVC_2017 struct Tuple { __host__ __device__ Tuple& operator=(const Tuple&); @@ -110,13 +107,9 @@ static_assert(cuda::std::assignable_from, ""); static_assert(cuda::std::assignable_from, ""); static_assert(!cuda::std::assignable_from, ""); static_assert(!cuda::std::assignable_from, ""); -#ifndef TEST_COMPILER_MSVC_2017 static_assert(cuda::std::assignable_from, ""); -#endif // !TEST_COMPILER_MSVC_2017 static_assert(!cuda::std::assignable_from, ""); -#ifndef TEST_COMPILER_MSVC_2017 static_assert(cuda::std::assignable_from, ""); -#endif // !TEST_COMPILER_MSVC_2017 static_assert(!cuda::std::assignable_from, ""); static_assert(!cuda::std::assignable_from, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp index ec6086e3505..ff0f4ae178b 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp @@ -267,13 +267,11 @@ struct convertible_with_const_s2 }; static_assert(common_reference_with, ""); -#ifndef TEST_COMPILER_MSVC_2017 struct convertible_with_volatile_s2 { __host__ __device__ operator s2 volatile&() volatile; }; static_assert(common_reference_with, ""); -#endif // !TEST_COMPILER_MSVC_2017 struct BadBasicCommonReference { diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.convertible/convertible_to.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.convertible/convertible_to.pass.cpp index fdff99fe55e..3b4bd632899 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.convertible/convertible_to.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.convertible/convertible_to.pass.cpp @@ -259,15 +259,11 @@ int main(int, char**) CheckConvertibleTo(); CheckConvertibleTo(); CheckConvertibleTo(); -# ifndef TEST_COMPILER_MSVC_2017 CheckConvertibleTo(); -# endif // !TEST_COMPILER_MSVC_2017 CheckConvertibleTo(); CheckConvertibleTo(); -# ifndef TEST_COMPILER_MSVC_2017 static_assert(convertible_to, ""); -# endif // !TEST_COMPILER_MSVC_2017 static_assert(convertible_to, ""); CheckNotConvertibleTo(); @@ -278,13 +274,9 @@ int main(int, char**) // NoexceptFunction& CheckNotConvertibleTo(); -# ifndef TEST_COMPILER_MSVC_2017 CheckNotConvertibleTo(); -# endif // !TEST_COMPILER_MSVC_2017 CheckNotConvertibleTo(); -# ifndef TEST_COMPILER_MSVC_2017 CheckConvertibleTo(); -# endif // !TEST_COMPILER_MSVC_2017 CheckConvertibleTo(); CheckConvertibleTo(); @@ -328,10 +320,10 @@ int main(int, char**) static_assert(!convertible_to, ""); static_assert(convertible_to, ""); -#if !defined(TEST_COMPILER_MSVC) || TEST_STD_VER > 2017 // MSVC has a bug where lets the conversion happen +#if TEST_STD_VER > 2017 // MSVC has a bug where lets the conversion happen static_assert(!convertible_to, ""); static_assert(!convertible_to, ""); -#endif // !defined(TEST_COMPILER_MSVC) || TEST_STD_VER > 2017 +#endif // TEST_STD_VER > 2017 static_assert(convertible_to, ""); static_assert(convertible_to, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp index 7a9b004c5d2..d251729a81a 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp @@ -20,10 +20,6 @@ #include "test_macros.h" #include "type_classification/moveconstructible.h" -#ifdef TEST_COMPILER_MSVC_2017 -# pragma warning(disable : 4239) -#endif // TEST_COMPILER_MSVC_2017 - using cuda::std::swappable; template @@ -111,9 +107,9 @@ __host__ __device__ constexpr bool check_throwable_swappable() { auto x = throwable_adl_swappable{0}; auto y = throwable_adl_swappable{1}; -#if !defined(TEST_COMPILER_BROKEN_SMF_NOEXCEPT) && !defined(TEST_COMPILER_MSVC_2017) +#if !defined(TEST_COMPILER_BROKEN_SMF_NOEXCEPT) ASSERT_NOT_NOEXCEPT(cuda::std::ranges::swap(x, y)); -#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT && !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT assert(check_swap_21(x, y)); return true; } @@ -128,7 +124,6 @@ __host__ __device__ constexpr bool check_non_move_constructible_adl_swappable() } #if TEST_STD_VER > 2014 -# ifndef TEST_COMPILER_MSVC_2017 __host__ __device__ constexpr bool check_non_move_assignable_adl_swappable() { auto x = non_move_assignable_adl_swappable{0}; @@ -137,7 +132,6 @@ __host__ __device__ constexpr bool check_non_move_assignable_adl_swappable() assert(check_swap_21(x, y)); return true; } -# endif // !TEST_COMPILER_MSVC_2017 #endif // TEST_STD_VER > 2014 namespace swappable_namespace @@ -182,9 +176,9 @@ __host__ __device__ constexpr bool check_throwable_adl_swappable_arrays() { throwable_adl_swappable x[] = {{0}, {1}, {2}, {3}}; throwable_adl_swappable y[] = {{4}, {5}, {6}, {7}}; -#if !defined(TEST_COMPILER_BROKEN_SMF_NOEXCEPT) && !defined(TEST_COMPILER_MSVC_2017) +#if !defined(TEST_COMPILER_BROKEN_SMF_NOEXCEPT) ASSERT_NOT_NOEXCEPT(cuda::std::ranges::swap(x, y)); -#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT && !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT assert(check_swap_22(x, y)); return true; } @@ -270,11 +264,7 @@ int main(int, char**) assert(check_rvalue_lvalue_adl_swappable()); assert(check_throwable_swappable()); assert(check_non_move_constructible_adl_swappable()); -#if TEST_STD_VER > 2014 -# ifndef TEST_COMPILER_MSVC_2017 assert(check_non_move_assignable_adl_swappable()); -# endif // TEST_COMPILER_MSVC_2017 -#endif // TEST_STD_VER > 2014 assert(check_swap_arrays()); assert(check_lvalue_adl_swappable_arrays()); assert(check_throwable_adl_swappable_arrays()); @@ -288,11 +278,7 @@ int main(int, char**) static_assert(check_rvalue_lvalue_adl_swappable(), ""); static_assert(check_throwable_swappable(), ""); static_assert(check_non_move_constructible_adl_swappable(), ""); -# if TEST_STD_VER > 2014 -# ifndef TEST_COMPILER_MSVC_2017 static_assert(check_non_move_assignable_adl_swappable(), ""); -# endif // TEST_COMPILER_MSVC_2017 -# endif // TEST_STD_VER > 2014 static_assert(check_swap_arrays(), ""); static_assert(check_lvalue_adl_swappable_arrays(), ""); static_assert(check_throwable_adl_swappable_arrays(), ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable_with.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable_with.compile.pass.cpp index 5e080dd9b61..0f46d80fe30 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable_with.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable_with.compile.pass.cpp @@ -338,7 +338,6 @@ struct s2 __host__ __device__ friend void swap(s2 const volatile&, s2 const volatile&); }; -#ifndef TEST_COMPILER_MSVC_2017 struct swappable_with_const_s2 { __host__ __device__ swappable_with_const_s2(swappable_with_const_s2 const&); @@ -385,7 +384,6 @@ struct swappable_with_cv_s2 __host__ __device__ operator s2 const volatile&() const volatile; }; static_assert(swappable_with, ""); -#endif // !TEST_COMPILER_MSVC_2017 struct swappable_with_rvalue_ref_to_s1_but_not_swappable { @@ -461,7 +459,6 @@ struct s3 __host__ __device__ friend void swap(s3 const volatile&&, s3 const volatile&&); }; -#ifndef TEST_COMPILER_MSVC_2017 struct swappable_with_rvalue_ref_to_s3 { __host__ __device__ friend void swap(swappable_with_rvalue_ref_to_s3&&, swappable_with_rvalue_ref_to_s3&&); @@ -487,7 +484,6 @@ struct swappable_with_rvalue_ref_to_const_s3 __host__ __device__ operator s3() const; }; static_assert(swappable_with, ""); -#endif // !TEST_COMPILER_MSVC_2017 #if !defined(TEST_COMPILER_MSVC) || TEST_STD_VER > 2017 // MSVC ignores the rvalue/lvalue distinction in the swap // definitions @@ -551,9 +547,7 @@ static_assert(swappable_with 2017 static_assert(swappable_with, ""); static_assert(swappable_with, ""); -#ifndef TEST_COMPILER_MSVC_2017 static_assert(swappable_with, ""); -#endif // !TEST_COMPILER_MSVC_2017 } // namespace adl namespace standard_types @@ -575,7 +569,6 @@ static_assert(!check_swappable_with(), ""); } // namespace types_with_purpose -#ifndef TEST_COMPILER_MSVC_2017 namespace LWG3175 { // Example taken directly from [concept.swappable] @@ -629,7 +622,6 @@ __host__ __device__ constexpr bool CheckRegression() static_assert(CheckRegression(), ""); } // namespace LWG3175 -#endif // !TEST_COMPILER_MSVC_2017 int main(int, char**) { diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/movable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/movable.compile.pass.cpp index 68006e6d465..387a6562658 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/movable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/movable.compile.pass.cpp @@ -88,12 +88,10 @@ static_assert(!movable, ""); static_assert(!movable, ""); static_assert(movable, ""); -#ifndef TEST_COMPILER_MSVC_2017 static_assert(movable, ""); static_assert(movable, ""); static_assert(movable, ""); static_assert(movable, ""); -#endif // !TEST_COMPILER_MSVC_2017 static_assert(!movable, ""); #if !defined(TEST_COMPILER_MSVC) || TEST_STD_VER > 2017 // MSVC chokes on multiple definitions of SMF diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp index 381573a92d8..78220e66e46 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp @@ -17,11 +17,7 @@ #include "test_macros.h" -#if defined(TEST_COMPILER_MSVC_2017) -# define TEST_CONSTEXPR_CXX14_NOT_MSVC_2017 -#else // ^^^ TEST_COMPILER_MSVC_2017 ^^^ / vvv !TEST_COMPILER_MSVC_2017 -# define TEST_CONSTEXPR_CXX14_NOT_MSVC_2017 TEST_CONSTEXPR_CXX14 -#endif // !TEST_COMPILER_MSVC_2017 +#define TEST_CONSTEXPR_CXX14_NOT_MSVC_2017 TEST_CONSTEXPR_CXX14 struct NoDefault { @@ -135,8 +131,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14_NOT_MSVC_2017 bool tests() int main(int, char**) { tests(); -#if TEST_STD_VER >= 2014 && defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED) && !defined(TEST_COMPILER_MSVC_2017) static_assert(tests(), ""); -#endif return 0; } diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.creation/to_array.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.creation/to_array.pass.cpp index e5b6aaf298e..2917cec2e94 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.creation/to_array.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.creation/to_array.pass.cpp @@ -37,7 +37,6 @@ __host__ __device__ constexpr bool tests() assert(arr[2] == 3); } -#if !defined(TEST_COMPILER_MSVC_2017) { const long l1 = 42; auto arr = cuda::std::to_array({1L, 4L, 9L, l1}); @@ -48,7 +47,6 @@ __host__ __device__ constexpr bool tests() assert(arr[2] == 9); assert(arr[3] == l1); } -#endif // !TEST_COMPILER_MSVC_2017 { auto arr = cuda::std::to_array("meow"); @@ -78,7 +76,6 @@ __host__ __device__ constexpr bool tests() assert(arr[2] == 6.0); } -#if !defined(TEST_COMPILER_MSVC_2017) { MoveOnly source[] = {MoveOnly{0}, MoveOnly{1}, MoveOnly{2}}; @@ -89,7 +86,6 @@ __host__ __device__ constexpr bool tests() assert(arr[i].get() == i && source[i].get() == 0); } } -#endif // !TEST_COMPILER_MSVC_2017 #if defined(TEST_COMPILER_NVRTC) && defined(TEST_COMPILER_MSVC) // Test C99 compound literal. diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/array/indexing_const.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/array/indexing_const.pass.cpp index dec298d6f4c..c4a76879532 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/array/indexing_const.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/array/indexing_const.pass.cpp @@ -68,8 +68,6 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool tests() int main(int, char**) { tests(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) static_assert(tests(), ""); -#endif return 0; } diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assign.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assign.pass.cpp index a2d12513c3f..ff039c2553f 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assign.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assign.pass.cpp @@ -28,7 +28,6 @@ _CCCL_DIAG_SUPPRESS_GCC("-Wmissing-braces") _CCCL_DIAG_SUPPRESS_CLANG("-Wmissing-braces") _CCCL_DIAG_SUPPRESS_MSVC(5246) -#if TEST_STD_VER >= 2017 && !defined(TEST_COMPILER_MSVC_2017) template class Range> __host__ __device__ constexpr void test_ranges() { @@ -65,7 +64,6 @@ __host__ __device__ constexpr void test_ranges() assert(equal_range(vec, cuda::std::array{T(42), T(1), T(42), T(1337), T(0), T(42)})); } } -#endif // TEST_STD_VER >= 2017 && !defined(TEST_COMPILER_MSVC_2017) template __host__ __device__ constexpr void test() @@ -221,12 +219,10 @@ __host__ __device__ constexpr void test() assert(equal_range(vec, expected)); } -#if TEST_STD_VER >= 2017 && !defined(TEST_COMPILER_MSVC_2017) test_ranges(); test_ranges(); test_ranges(); test_ranges(); -#endif // TEST_STD_VER >= 2017 && !defined(TEST_COMPILER_MSVC_2017) } __host__ __device__ constexpr bool test() @@ -245,7 +241,6 @@ __host__ __device__ constexpr bool test() } #ifndef TEST_HAS_NO_EXCEPTIONS -# if TEST_STD_VER >= 2017 && !defined(TEST_COMPILER_MSVC_2017) template