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/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/cub/cub/util_cpp_dialect.cuh b/cub/cub/util_cpp_dialect.cuh index 2c5641b180d..96922e3ee10 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 e66b7bf2ac3..11abb9c7b54 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 @@ -318,6 +318,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 edf17e70865..659d7a9ce4f 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. @@ -283,6 +283,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/get_memory_resource.cuh b/cudax/include/cuda/experimental/__memory_resource/get_memory_resource.cuh index f95e1a32ef2..565b7082a01 100644 --- a/cudax/include/cuda/experimental/__memory_resource/get_memory_resource.cuh +++ b/cudax/include/cuda/experimental/__memory_resource/get_memory_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/properties.cuh b/cudax/include/cuda/experimental/__memory_resource/properties.cuh index b1646ab4b36..8204465e27e 100644 --- a/cudax/include/cuda/experimental/__memory_resource/properties.cuh +++ b/cudax/include/cuda/experimental/__memory_resource/properties.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 // _CCCL_COMPILER(MSVC2017) - #if !defined(LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE) # define LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE #endif diff --git a/cudax/include/cuda/experimental/__memory_resource/shared_resource.cuh b/cudax/include/cuda/experimental/__memory_resource/shared_resource.cuh index 4c71f5cfe2e..98663190ead 100644 --- a/cudax/include/cuda/experimental/__memory_resource/shared_resource.cuh +++ b/cudax/include/cuda/experimental/__memory_resource/shared_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 shared_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/docs/cccl_development/macro.rst b/docs/cccl_development/macro.rst index 6b832da0000..8098137854e 100644 --- a/docs/cccl_development/macro.rst +++ b/docs/cccl_development/macro.rst @@ -21,8 +21,6 @@ Compiler Macros +------------------------------+---------------------------------------------+ | ``_CCCL_COMPILER(MSVC)`` | Microsoft Visual Studio | +------------------------------+---------------------------------------------+ -| ``_CCCL_COMPILER(MSVC2017)`` | Microsoft Visual Studio 2017 (deprecated) | -+------------------------------+---------------------------------------------+ | ``_CCCL_COMPILER(MSVC2019)`` | Microsoft Visual Studio 2019 | +------------------------------+---------------------------------------------+ | ``_CCCL_COMPILER(MSVC2022)`` | Microsoft Visual Studio 2022 | diff --git a/docs/libcudacxx/setup/requirements.rst b/docs/libcudacxx/setup/requirements.rst index f8da901b096..d86b6711a1d 100644 --- a/docs/libcudacxx/setup/requirements.rst +++ b/docs/libcudacxx/setup/requirements.rst @@ -49,9 +49,9 @@ NVCC Host Compilers When used with NVCC, the NVIDIA C++ Standard Library supports the following host compilers: -- MSVC 2017 and 2019. -- GCC 5, 6, 7, 8, 9, and 10. -- Clang 7, 8, 9, and 10. +- MSVC 2019 and 2022. +- GCC 6, until 13. +- Clang 14 until 18. - ICPC latest. - NVHPC 20.9 and 20.11. diff --git a/libcudacxx/include/cuda/__memory_resource/get_property.h b/libcudacxx/include/cuda/__memory_resource/get_property.h index 43712ede2a5..e86d0f65da9 100644 --- a/libcudacxx/include/cuda/__memory_resource/get_property.h +++ b/libcudacxx/include/cuda/__memory_resource/get_property.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 @@ -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 d8e7894ee10..4a64ddf1c3c 100644 --- a/libcudacxx/include/cuda/std/__cccl/compiler.h +++ b/libcudacxx/include/cuda/std/__cccl/compiler.h @@ -53,11 +53,12 @@ #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)) +# ifndef CCCL_IGNORE_DEPRECATED_COMPILER +# error \ + "Visual Studio 2017 (MSC_VER < 1920) and older are not supported by CCCL. Define CCCL_IGNORE_DEPRECATED_COMPILER to suppress this error." +# endif # 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..4248fb8c541 100644 --- a/libcudacxx/include/cuda/std/__cccl/diagnostic.h +++ b/libcudacxx/include/cuda/std/__cccl/diagnostic.h @@ -106,13 +106,13 @@ # 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 +# if _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 +# else // ^^^ _CCCL_COMPILER(GCC) ^^^ / vvv !_CCCL_COMPILER(GCC) 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) +# endif // !_CCCL_COMPILER(GCC) # endif // !__NVCC_DIAG_PRAGMA_SUPPORT__ #else // ^^^ _CCCL_HAS_CUDA_COMPILER ^^^ / vvv !_CCCL_HAS_CUDA_COMPILER vvv # define _CCCL_NV_DIAG_SUPPRESS(_WARNING) @@ -147,7 +147,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 bb127f6eb0c..98a7866068e 100644 --- a/libcudacxx/include/cuda/std/__cccl/unreachable.h +++ b/libcudacxx/include/cuda/std/__cccl/unreachable.h @@ -29,14 +29,7 @@ #elif defined(__CUDA_ARCH__) # define _CCCL_UNREACHABLE() __builtin_unreachable() #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/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/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..31838eb8d27 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 @@ -75,6 +75,6 @@ _CCCL_GLOBAL_CONSTANT empty_view<_Tp> empty{}; _LIBCUDACXX_END_NAMESPACE_VIEWS -#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER_MSVC_2017 +#endif // _CCCL_STD_VER >= 2017 #endif // _LIBCUDACXX___RANGES_EMPTY_VIEW_H 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 1be2fa03d49..892de64499c 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 @@ -512,6 +512,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 af1f7ba85ad..23f4ab91625 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/variant +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/variant @@ -294,7 +294,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 @@ -2172,6 +2172,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..a13ceb34d33 100644 --- a/libcudacxx/include/cuda/std/inplace_vector +++ b/libcudacxx/include/cuda/std/inplace_vector @@ -315,11 +315,11 @@ protected: iterator __curr = __dest; for (; __first != __last; ++__curr, (void) ++__first) { -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 ::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) +# endif // _CCCL_STD_VER <= 2014 } this->__size_ += static_cast<__size_type>(__curr - __dest); } @@ -332,11 +332,11 @@ 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) +# if _CCCL_STD_VER >= 2017 ::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) +# endif // _CCCL_STD_VER <= 2014 } __guard.__complete(); this->__size_ += static_cast<__size_type>(__curr - __dest); @@ -590,22 +590,22 @@ 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) +# if _CCCL_STD_VER >= 2017 __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) +# endif // _CCCL_STD_VER <= 2014 } 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) +# if _CCCL_STD_VER >= 2017 __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) +# endif // _CCCL_STD_VER <= 2014 } }; @@ -800,7 +800,7 @@ public: } } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES( _CUDA_VRANGES::__container_compatible_range<_Range, _Tp> _CCCL_AND(!_CUDA_VRANGES::forward_range<_Range>)) @@ -851,7 +851,7 @@ public: this->__uninitialized_move(_CUDA_VRANGES::begin(__range), _CUDA_VRANGES::__unwrap_end(__range), this->begin()); } } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# endif // _CCCL_STD_VER >= 2017 _LIBCUDACXX_HIDE_FROM_ABI constexpr inplace_vector& operator=(initializer_list<_Tp> __ilist) { @@ -961,7 +961,7 @@ public: } } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES( _CUDA_VRANGES::__container_compatible_range<_Range, _Tp> _CCCL_AND(!_CUDA_VRANGES::forward_range<_Range>)) @@ -1037,7 +1037,7 @@ public: this->__uninitialized_copy(__middle, __last, this->end()); } } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# endif // _CCCL_STD_VER >= 2017 // [containers.sequences.inplace.vector.access], element access _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr reference at(const size_type __pos) @@ -1307,7 +1307,7 @@ public: return __res; } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES( _CUDA_VRANGES::__container_compatible_range<_Range, _Tp> _CCCL_AND(!_CUDA_VRANGES::forward_range<_Range>)) @@ -1355,7 +1355,7 @@ public: auto __first = _CUDA_VRANGES::begin(__range); insert(this->end(), __first, _CUDA_VRANGES::__unwrap_end(__range)); } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# endif // _CCCL_STD_VER >= 2017 template _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator emplace(const_iterator __cpos, _Args&&... __args) @@ -1451,7 +1451,7 @@ public: return _CUDA_VSTD::addressof(this->unchecked_emplace_back(_CUDA_VSTD::move(__value))); } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 _CCCL_TEMPLATE(class _Range) _CCCL_REQUIRES( _CUDA_VRANGES::__container_compatible_range<_Range, _Tp> _CCCL_AND(!_CUDA_VRANGES::forward_range<_Range>)) @@ -1498,7 +1498,7 @@ public: this->__uninitialized_move(__first, __middle, this->end()); return __middle; } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# endif // _CCCL_STD_VER >= 2017 using __base::unchecked_emplace_back; @@ -1786,7 +1786,7 @@ public: } } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 _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 +1797,7 @@ public: _CUDA_VSTD::__throw_bad_alloc(); } } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# endif // _CCCL_STD_VER >= 2017 _LIBCUDACXX_HIDE_FROM_ABI constexpr inplace_vector& operator=(initializer_list<_Tp> __ilist) { @@ -1838,7 +1838,7 @@ public: return; } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 _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 +1849,7 @@ public: } return; } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# endif // _CCCL_STD_VER >= 2017 // [containers.sequences.inplace.vector.access], element access _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr reference at(const size_type __pos) @@ -1996,7 +1996,7 @@ public: return nullptr; } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 _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 +2017,7 @@ public: _CUDA_VSTD::__throw_bad_alloc(); } } -# endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# endif // _CCCL_STD_VER >= 2017 template _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator emplace(const_iterator, _Args&&...) @@ -2061,14 +2061,14 @@ public: return nullptr; } -# if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) +# if _CCCL_STD_VER >= 2017 _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) +# endif // _CCCL_STD_VER >= 2017 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 3f907d7efab..dadc9c32839 100644 --- a/libcudacxx/test/libcudacxx/CMakeLists.txt +++ b/libcudacxx/test/libcudacxx/CMakeLists.txt @@ -60,10 +60,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/heterogeneous/barrier_parity.cuda.pass.cpp b/libcudacxx/test/libcudacxx/heterogeneous/barrier_parity.cuda.pass.cpp index 072dcfd1659..922c3922712 100644 --- a/libcudacxx/test/libcudacxx/heterogeneous/barrier_parity.cuda.pass.cpp +++ b/libcudacxx/test/libcudacxx/heterogeneous/barrier_parity.cuda.pass.cpp @@ -73,7 +73,6 @@ struct clear_token } }; -// older CTK together with MSVC 2017 cannot handle the full list using aw_aw_pw1 = performer_list, barrier_arrive_and_wait, 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..309411694e4 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 @@ -119,9 +119,9 @@ int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..0302869d1f4 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..67231a9e701 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..52a58d5d565 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..82ff46d068d 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 @@ -80,10 +80,10 @@ int main(int, char**) test(); test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); static_assert(test(), ""); // clang otherwise hits the evaluation limit -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..79b68ef2b81 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..d729d6000ab 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..19cc4b90262 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..43a85df7618 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..452e4b0e5a5 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..eb8da8ac058 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..9c9a5efd827 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..77ae0cb3974 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && !TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..a3f35fa5301 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && ! TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..183e4a5a952 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,9 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() int main(int, char**) { test(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 static_assert(test(), ""); -#endif // TEST_STD_VER >= 2014 && ! TEST_COMPILER_MSVC_2017 +#endif // TEST_STD_VER >= 2014 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..c75566d4084 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; } @@ -271,9 +265,7 @@ int main(int, char**) 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()); @@ -289,9 +281,7 @@ int main(int, char**) 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(), ""); 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..3010f1a4122 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,12 +17,6 @@ #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 - struct NoDefault { __host__ __device__ TEST_CONSTEXPR_CXX14 NoDefault(int) {} @@ -38,7 +32,7 @@ struct NonTrivialCopy } }; -__host__ __device__ TEST_CONSTEXPR_CXX14_NOT_MSVC_2017 bool tests() +__host__ __device__ TEST_CONSTEXPR_CXX14 bool tests() { { typedef cuda::std::array Array; @@ -135,7 +129,7 @@ __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) +#if defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED) 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..c730fbfa2c2 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,7 +68,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool tests() int main(int, char**) { tests(); -#if TEST_STD_VER >= 2014 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2014 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..eb4366c3af6 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,7 @@ _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) +#if TEST_STD_VER >= 2017 template class Range> __host__ __device__ constexpr void test_ranges() { @@ -65,7 +65,7 @@ __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) +#endif // TEST_STD_VER >= 2017 template __host__ __device__ constexpr void test() @@ -221,12 +221,12 @@ __host__ __device__ constexpr void test() assert(equal_range(vec, expected)); } -#if TEST_STD_VER >= 2017 && !defined(TEST_COMPILER_MSVC_2017) +#if TEST_STD_VER >= 2017 test_ranges(); test_ranges(); test_ranges(); test_ranges(); -#endif // TEST_STD_VER >= 2017 && !defined(TEST_COMPILER_MSVC_2017) +#endif // TEST_STD_VER >= 2017 } __host__ __device__ constexpr bool test() @@ -245,7 +245,7 @@ __host__ __device__ constexpr bool test() } #ifndef TEST_HAS_NO_EXCEPTIONS -# if TEST_STD_VER >= 2017 && !defined(TEST_COMPILER_MSVC_2017) +# if TEST_STD_VER >= 2017 template