diff --git a/CMakePresets.json b/CMakePresets.json index 089f9b81798..bd10a95200b 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -69,8 +69,6 @@ "CUB_ENABLE_TESTING": true, "CUB_ENABLE_EXAMPLES": true, "CUB_SEPARATE_CATCH2": true, - "CUB_ENABLE_DIALECT_CPP11": true, - "CUB_ENABLE_DIALECT_CPP14": true, "CUB_ENABLE_DIALECT_CPP17": true, "CUB_ENABLE_DIALECT_CPP20": true, "THRUST_ENABLE_MULTICONFIG": true, @@ -232,30 +230,10 @@ "CUB_ENABLE_TESTING": true, "CUB_ENABLE_EXAMPLES": true, "CUB_SEPARATE_CATCH2": true, - "CUB_ENABLE_DIALECT_CPP11": false, - "CUB_ENABLE_DIALECT_CPP14": false, "CUB_ENABLE_DIALECT_CPP17": false, "CUB_ENABLE_DIALECT_CPP20": false } }, - { - "name": "cub-cpp11", - "displayName": "CUB: C++11", - "inherits": "cub-base", - "cacheVariables": { - "CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true, - "CUB_ENABLE_DIALECT_CPP11": true - } - }, - { - "name": "cub-cpp14", - "displayName": "CUB: C++14", - "inherits": "cub-base", - "cacheVariables": { - "CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true, - "CUB_ENABLE_DIALECT_CPP14": true - } - }, { "name": "cub-cpp17", "displayName": "CUB: C++17", @@ -289,24 +267,6 @@ "THRUST_MULTICONFIG_ENABLE_DIALECT_CPP20": false } }, - { - "name": "thrust-cpp11", - "displayName": "Thrust: C++11", - "inherits": "thrust-base", - "cacheVariables": { - "CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true, - "THRUST_MULTICONFIG_ENABLE_DIALECT_CPP11": true - } - }, - { - "name": "thrust-cpp14", - "displayName": "Thrust: C++14", - "inherits": "thrust-base", - "cacheVariables": { - "CCCL_IGNORE_DEPRECATED_CPP_DIALECT": true, - "THRUST_MULTICONFIG_ENABLE_DIALECT_CPP14": true - } - }, { "name": "thrust-cpp17", "displayName": "Thrust: C++17", @@ -520,14 +480,6 @@ "libcudacxx-base" ] }, - { - "name": "cub-cpp11", - "configurePreset": "cub-cpp11" - }, - { - "name": "cub-cpp14", - "configurePreset": "cub-cpp14" - }, { "name": "cub-cpp17", "configurePreset": "cub-cpp17" @@ -536,14 +488,6 @@ "name": "cub-cpp20", "configurePreset": "cub-cpp20" }, - { - "name": "thrust-cpp11", - "configurePreset": "thrust-cpp11" - }, - { - "name": "thrust-cpp14", - "configurePreset": "thrust-cpp14" - }, { "name": "thrust-cpp17", "configurePreset": "thrust-cpp17" @@ -736,16 +680,6 @@ } } }, - { - "name": "cub-nolid-cpp11", - "configurePreset": "cub-cpp11", - "inherits": "cub-nolid-base" - }, - { - "name": "cub-nolid-cpp14", - "configurePreset": "cub-cpp14", - "inherits": "cub-nolid-base" - }, { "name": "cub-nolid-cpp17", "configurePreset": "cub-cpp17", @@ -756,16 +690,6 @@ "configurePreset": "cub-cpp20", "inherits": "cub-nolid-base" }, - { - "name": "cub-lid0-cpp11", - "configurePreset": "cub-cpp11", - "inherits": "cub-lid0-base" - }, - { - "name": "cub-lid0-cpp14", - "configurePreset": "cub-cpp14", - "inherits": "cub-lid0-base" - }, { "name": "cub-lid0-cpp17", "configurePreset": "cub-cpp17", @@ -776,16 +700,6 @@ "configurePreset": "cub-cpp20", "inherits": "cub-lid0-base" }, - { - "name": "cub-lid1-cpp11", - "configurePreset": "cub-cpp11", - "inherits": "cub-lid1-base" - }, - { - "name": "cub-lid1-cpp14", - "configurePreset": "cub-cpp14", - "inherits": "cub-lid1-base" - }, { "name": "cub-lid1-cpp17", "configurePreset": "cub-cpp17", @@ -796,16 +710,6 @@ "configurePreset": "cub-cpp20", "inherits": "cub-lid1-base" }, - { - "name": "cub-lid2-cpp11", - "configurePreset": "cub-cpp11", - "inherits": "cub-lid2-base" - }, - { - "name": "cub-lid2-cpp14", - "configurePreset": "cub-cpp14", - "inherits": "cub-lid2-base" - }, { "name": "cub-lid2-cpp17", "configurePreset": "cub-cpp17", @@ -816,16 +720,6 @@ "configurePreset": "cub-cpp20", "inherits": "cub-lid2-base" }, - { - "name": "cub-cpp11", - "configurePreset": "cub-cpp11", - "inherits": "cub-base" - }, - { - "name": "cub-cpp14", - "configurePreset": "cub-cpp14", - "inherits": "cub-base" - }, { "name": "cub-cpp17", "configurePreset": "cub-cpp17", @@ -866,16 +760,6 @@ } } }, - { - "name": "thrust-gpu-cpp11", - "configurePreset": "thrust-cpp11", - "inherits": "thrust-gpu-base" - }, - { - "name": "thrust-gpu-cpp14", - "configurePreset": "thrust-cpp14", - "inherits": "thrust-gpu-base" - }, { "name": "thrust-gpu-cpp17", "configurePreset": "thrust-cpp17", @@ -886,16 +770,6 @@ "configurePreset": "thrust-cpp20", "inherits": "thrust-gpu-base" }, - { - "name": "thrust-cpu-cpp11", - "configurePreset": "thrust-cpp11", - "inherits": "thrust-cpu-base" - }, - { - "name": "thrust-cpu-cpp14", - "configurePreset": "thrust-cpp14", - "inherits": "thrust-cpu-base" - }, { "name": "thrust-cpu-cpp17", "configurePreset": "thrust-cpp17", @@ -906,16 +780,6 @@ "configurePreset": "thrust-cpp20", "inherits": "thrust-cpu-base" }, - { - "name": "thrust-cpp11", - "configurePreset": "thrust-cpp11", - "inherits": "thrust-base" - }, - { - "name": "thrust-cpp14", - "configurePreset": "thrust-cpp14", - "inherits": "thrust-base" - }, { "name": "thrust-cpp17", "configurePreset": "thrust-cpp17", diff --git a/README.md b/README.md index 383afe7e339..358adadc87b 100644 --- a/README.md +++ b/README.md @@ -269,8 +269,8 @@ But we will not invest significant time in triaging or fixing issues for older c In the spirit of "You only support what you test", see our [CI Overview](https://github.com/NVIDIA/cccl/blob/main/ci-overview.md) for more information on exactly what we test. ### C++ Dialects -- C++11 (Deprecated in Thrust/CUB, to be removed in next major version) -- C++14 (Deprecated in Thrust/CUB, to be removed in next major version) +- C++11 (only libcu++) +- C++14 (only libcu++) - C++17 - C++20 diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 2adbcd718ff..66cc47dd271 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -13,7 +13,8 @@ workflows: # Old CTK/compiler - {jobs: ['build'], std: 'minmax', ctk: '12.0', cxx: ['gcc7', 'gcc9', 'clang9', 'msvc2019']} # Current CTK build-only - - {jobs: ['build'], std: [11, 14], cxx: ['gcc7', 'clang9']} + - {jobs: ['build'], std: [11, 14], cxx: ['gcc7', 'clang9'], project: 'libcudacxx'} + - {jobs: ['build'], std: [17], cxx: ['gcc7', 'clang9']} - {jobs: ['build'], std: 'max', cxx: ['gcc8', 'gcc9', 'gcc10', 'gcc11', 'gcc12']} - {jobs: ['build'], std: 'max', cxx: ['clang10', 'clang11', 'clang12', 'clang13', 'clang14', 'clang15', 'clang16', 'clang17']} - {jobs: ['build'], std: 'max', cxx: ['msvc2019']} @@ -246,11 +247,11 @@ projects: stds: [11, 14, 17, 20] cub: name: 'CUB' - stds: [11, 14, 17, 20] + stds: [17, 20] job_map: { test: ['test_nolid', 'test_lid0', 'test_lid1', 'test_lid2'] } thrust: name: 'Thrust' - stds: [11, 14, 17, 20] + stds: [17, 20] job_map: { test: ['test_cpu', 'test_gpu'] } cudax: stds: [17, 20] diff --git a/cub/cmake/CubBuildTargetList.cmake b/cub/cmake/CubBuildTargetList.cmake index 27dedd68210..7c6f59e8856 100644 --- a/cub/cmake/CubBuildTargetList.cmake +++ b/cub/cmake/CubBuildTargetList.cmake @@ -150,16 +150,6 @@ function(cub_build_target_list) cmake_minimum_required(VERSION 3.18.3) endif() - # Supported versions of MSVC do not distinguish between C++11 and C++14. - # Warn the user that they may be generating a ton of redundant targets. - if ("MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}" AND - CUB_ENABLE_DIALECT_CPP11) - message(WARNING - "Supported versions of MSVC (2017+) do not distinguish between C++11 " - "and C++14. The requested C++11 targets will be built with C++14." - ) - endif() - # Generic config flags: macro(add_flag_option flag docstring default) set(opt "CCCL_${flag}") diff --git a/cub/cub/util_cpp_dialect.cuh b/cub/cub/util_cpp_dialect.cuh index de745638ac8..a6eee36539c 100644 --- a/cub/cub/util_cpp_dialect.cuh +++ b/cub/cub/util_cpp_dialect.cuh @@ -44,17 +44,9 @@ // Deprecation warnings may be silenced by defining the following macros. These // may be combined. -// - CCCL_IGNORE_DEPRECATED_CPP_DIALECT: -// Ignore all deprecated C++ dialects and outdated compilers. -// - CCCL_IGNORE_DEPRECATED_CPP_11: -// Ignore deprecation warnings when compiling with C++11. C++03 and outdated -// compilers will still issue warnings. -// - CCCL_IGNORE_DEPRECATED_CPP_14: -// Ignore deprecation warnings when compiling with C++14. C++03 and outdated -// compilers will still issue warnings. // - CCCL_IGNORE_DEPRECATED_COMPILER // Ignore deprecation warnings when using deprecated compilers. Compiling -// with C++03, C++11 and C++14 will still issue warnings. +// with deprecated C++ dialects will still issue warnings. # define CUB_CPP_DIALECT _CCCL_STD_VER @@ -65,6 +57,7 @@ # define CUB_COMP_DEPR_IMPL(msg) _CCCL_PRAGMA(GCC warning #msg) # endif +// Compiler checks: // clang-format off # define CUB_COMPILER_DEPRECATION(REQ) \ CUB_COMP_DEPR_IMPL(CUB requires at least REQ. Define CCCL_IGNORE_DEPRECATED_COMPILER to suppress this message.) @@ -72,12 +65,10 @@ # define CUB_COMPILER_DEPRECATION_SOFT(REQ, CUR) \ CUB_COMP_DEPR_IMPL( \ CUB requires at least REQ. CUR is deprecated but still supported. CUR support will be removed in a \ - future release. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.) + future release. Define CCCL_IGNORE_DEPRECATED_COMPILER to suppress this message.) // clang-format on # ifndef CCCL_IGNORE_DEPRECATED_COMPILER - -// Compiler checks: # if _CCCL_COMPILER(GCC, <, 7) CUB_COMPILER_DEPRECATION(GCC 7.0); # elif _CCCL_COMPILER(CLANG, <, 7) @@ -89,24 +80,18 @@ CUB_COMPILER_DEPRECATION(MSVC 2019(19.20 / 16.0 / 14.20)); // >=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 -# if _CCCL_STD_VER < 2011 -// = 2017 - # undef CUB_COMPILER_DEPRECATION_SOFT # undef CUB_COMPILER_DEPRECATION + +// C++17 dialect check: +# ifndef CCCL_IGNORE_DEPRECATED_CPP_DIALECT +# if _CCCL_STD_VER < 2017 +CUB_COMP_DEPR_IMPL(CUB requires at least C++ 17. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.) +# endif // _CCCL_STD_VER >= 2017 +# endif + # undef CUB_COMP_DEPR_IMPL -# undef CUB_COMP_DEPR_IMPL0 -# undef CUB_COMP_DEPR_IMPL1 #endif // !_CCCL_DOXYGEN_INVOKED diff --git a/lib/cmake/thrust/thrust-config.cmake b/lib/cmake/thrust/thrust-config.cmake index e13bb8c5d32..fc7db1d86ba 100644 --- a/lib/cmake/thrust/thrust-config.cmake +++ b/lib/cmake/thrust/thrust-config.cmake @@ -237,36 +237,10 @@ function(thrust_create_target target_name) target_compile_definitions(${target_name} INTERFACE "THRUST_FORCE_64_BIT_OFFSET_TYPE") endif() - # This would be nice to enforce, but breaks when using old cmake + new - # compiler, since cmake doesn't know what features the new compiler version - # supports. - # Leaving this here as a reminder not to add it back. Just let the - # compile-time checks in thrust/detail/config/cpp_dialect.h handle it. - # - # if (NOT TCT_IGNORE_DEPRECATED_CPP_DIALECT) - # if (TCT_IGNORE_DEPRECATED_CPP_11) - # target_compile_features(${target_name} INTERFACE cxx_std_11) - # else() - # target_compile_features(${target_name} INTERFACE cxx_std_14) - # endif() - # endif() - - if (TCT_IGNORE_DEPRECATED_CPP_DIALECT OR CCCL_IGNORE_DEPRECATED_CPP_DIALECT) - target_compile_definitions(${target_name} INTERFACE "CCCL_IGNORE_DEPRECATED_CPP_DIALECT") - endif() - if (TCT_IGNORE_DEPRECATED_API OR CCCL_IGNORE_DEPRECATED_API) target_compile_definitions(${target_name} INTERFACE "CCCL_IGNORE_DEPRECATED_API") endif() - if (TCT_IGNORE_DEPRECATED_CPP_11 OR CCCL_IGNORE_DEPRECATED_CPP_11) - target_compile_definitions(${target_name} INTERFACE "CCCL_IGNORE_DEPRECATED_CPP_11") - endif() - - if (TCT_IGNORE_DEPRECATED_CPP_14 OR CCCL_IGNORE_DEPRECATED_CPP_14) - target_compile_definitions(${target_name} INTERFACE "CCCL_IGNORE_DEPRECATED_CPP_14") - endif() - if (TCT_IGNORE_DEPRECATED_COMPILER OR CCCL_IGNORE_DEPRECATED_COMPILER) target_compile_definitions(${target_name} INTERFACE "CCCL_IGNORE_DEPRECATED_COMPILER") endif() diff --git a/libcudacxx/include/cuda/std/__cccl/deprecated.h b/libcudacxx/include/cuda/std/__cccl/deprecated.h index aa10c47ebcd..f03ecfc07f7 100644 --- a/libcudacxx/include/cuda/std/__cccl/deprecated.h +++ b/libcudacxx/include/cuda/std/__cccl/deprecated.h @@ -24,20 +24,17 @@ #endif // no system header // Check for deprecation opt outs -#if defined(LIBCUDACXX_IGNORE_DEPRECATED_CPP_DIALECT) || defined(THRUST_IGNORE_DEPRECATED_CPP_DIALECT) \ - || defined(CUB_IGNORE_DEPRECATED_CPP_DIALECT) +#if defined(LIBCUDACXX_IGNORE_DEPRECATED_CPP_DIALECT) # if !defined(CCCL_IGNORE_DEPRECATED_CPP_DIALECT) # define CCCL_IGNORE_DEPRECATED_CPP_DIALECT # endif #endif // suppress all dialect deprecation warnings -#if defined(LIBCUDACXX_IGNORE_DEPRECATED_CPP_14) || defined(THRUST_IGNORE_DEPRECATED_CPP_14) \ - || defined(CUB_IGNORE_DEPRECATED_CPP_14) || defined(CCCL_IGNORE_DEPRECATED_CPP_DIALECT) +#if defined(LIBCUDACXX_IGNORE_DEPRECATED_CPP_14) || defined(CCCL_IGNORE_DEPRECATED_CPP_DIALECT) # if !defined(CCCL_IGNORE_DEPRECATED_CPP_14) # define CCCL_IGNORE_DEPRECATED_CPP_14 # endif #endif // suppress all c++14 dialect deprecation warnings -#if defined(LIBCUDACXX_IGNORE_DEPRECATED_CPP_11) || defined(THRUST_IGNORE_DEPRECATED_CPP_11) \ - || defined(CUB_IGNORE_DEPRECATED_CPP_11) || defined(CCCL_IGNORE_DEPRECATED_CPP_DIALECT) \ +#if defined(LIBCUDACXX_IGNORE_DEPRECATED_CPP_11) || defined(CCCL_IGNORE_DEPRECATED_CPP_DIALECT) \ || defined(CCCL_IGNORE_DEPRECATED_CPP_14) # if !defined(CCCL_IGNORE_DEPRECATED_CPP_11) # define CCCL_IGNORE_DEPRECATED_CPP_11 diff --git a/thrust/cmake/ThrustHeaderTesting.cmake b/thrust/cmake/ThrustHeaderTesting.cmake index 2eb3e33b5d6..7321e0db7a5 100644 --- a/thrust/cmake/ThrustHeaderTesting.cmake +++ b/thrust/cmake/ThrustHeaderTesting.cmake @@ -121,11 +121,6 @@ function(thrust_add_header_test thrust_target label definitions) HEADERS ${headers} ) target_link_libraries(${headertest_target} PUBLIC ${thrust_target}) - target_compile_definitions(${headertest_target} PRIVATE - ${header_definitions} - "THRUST_CPP11_REQUIRED_NO_ERROR" - "THRUST_CPP14_REQUIRED_NO_ERROR" - ) thrust_clone_target_properties(${headertest_target} ${thrust_target}) if ("CUDA" STREQUAL "${config_device}") diff --git a/thrust/testing/unittest/util_async.h b/thrust/testing/unittest/util_async.h index 4e129ff1a82..15293598b12 100644 --- a/thrust/testing/unittest/util_async.h +++ b/thrust/testing/unittest/util_async.h @@ -2,8 +2,6 @@ #include -#include - #if _CCCL_STD_VER >= 2014 # include diff --git a/thrust/thrust/async/copy.h b/thrust/thrust/async/copy.h index d52526444a0..b821f908a79 100644 --- a/thrust/thrust/async/copy.h +++ b/thrust/thrust/async/copy.h @@ -29,7 +29,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/async/for_each.h b/thrust/thrust/async/for_each.h index 17376343fed..9cdc9c1e048 100644 --- a/thrust/thrust/async/for_each.h +++ b/thrust/thrust/async/for_each.h @@ -29,7 +29,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/async/reduce.h b/thrust/thrust/async/reduce.h index d4cd7cd7c3f..18172bd692f 100644 --- a/thrust/thrust/async/reduce.h +++ b/thrust/thrust/async/reduce.h @@ -29,7 +29,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/async/scan.h b/thrust/thrust/async/scan.h index fcbb41ad43c..f58b37e8d3b 100644 --- a/thrust/thrust/async/scan.h +++ b/thrust/thrust/async/scan.h @@ -29,7 +29,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/async/sort.h b/thrust/thrust/async/sort.h index bd294048311..19304e38660 100644 --- a/thrust/thrust/async/sort.h +++ b/thrust/thrust/async/sort.h @@ -29,7 +29,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/async/transform.h b/thrust/thrust/async/transform.h index 901518c12e8..c54b328388e 100644 --- a/thrust/thrust/async/transform.h +++ b/thrust/thrust/async/transform.h @@ -29,7 +29,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/detail/config/cpp_dialect.h b/thrust/thrust/detail/config/cpp_dialect.h index 4c7a7930ad3..62850f61465 100644 --- a/thrust/thrust/detail/config/cpp_dialect.h +++ b/thrust/thrust/detail/config/cpp_dialect.h @@ -34,17 +34,9 @@ // Deprecation warnings may be silenced by defining the following macros. These // may be combined. -// - CCCL_IGNORE_DEPRECATED_CPP_DIALECT: -// Ignore all deprecated C++ dialects and outdated compilers. -// - CCCL_IGNORE_DEPRECATED_CPP_11: -// Ignore deprecation warnings when compiling with C++11. C++03 and outdated -// compilers will still issue warnings. -// - CCCL_IGNORE_DEPRECATED_CPP_14: -// Ignore deprecation warnings when compiling with C++14. C++03 and outdated -// compilers will still issue warnings. // - CCCL_IGNORE_DEPRECATED_COMPILER // Ignore deprecation warnings when using deprecated compilers. Compiling -// with C++03, C++11 and C++14 will still issue warnings. +// with deprecated C++ dialects will still issue warnings. #define THRUST_CPP_DIALECT _CCCL_STD_VER @@ -55,6 +47,7 @@ # define THRUST_COMP_DEPR_IMPL(msg) _CCCL_PRAGMA(GCC warning #msg) #endif +// Compiler checks: // clang-format off #define THRUST_COMPILER_DEPRECATION(REQ) \ THRUST_COMP_DEPR_IMPL(Thrust requires at least REQ. Define CCCL_IGNORE_DEPRECATED_COMPILER to suppress this message.) @@ -62,12 +55,10 @@ #define THRUST_COMPILER_DEPRECATION_SOFT(REQ, CUR) \ THRUST_COMP_DEPR_IMPL( \ Thrust requires at least REQ. CUR is deprecated but still supported. CUR support will be removed in a \ - future release. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.) + future release. Define CCCL_IGNORE_DEPRECATED_COMPILER to suppress this message.) // clang-format on #ifndef CCCL_IGNORE_DEPRECATED_COMPILER - -// Compiler checks: # if _CCCL_COMPILER(GCC, <, 7) THRUST_COMPILER_DEPRECATION(GCC 7.0); # elif _CCCL_COMPILER(CLANG, <, 7) @@ -79,22 +70,17 @@ THRUST_COMPILER_DEPRECATION(MSVC 2019(19.20 / 16.0 / 14.20)); // >=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 -#if _CCCL_STD_VER < 2011 -// = 2017 - #undef THRUST_COMPILER_DEPRECATION_SOFT #undef THRUST_COMPILER_DEPRECATION + +// C++17 dialect check: +#ifndef CCCL_IGNORE_DEPRECATED_CPP_DIALECT +# if _CCCL_STD_VER < 2017 +THRUST_COMP_DEPR_IMPL( + Thrust requires at least C++ 17. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.) +# endif // _CCCL_STD_VER >= 2017 +#endif + #undef THRUST_COMP_DEPR_IMPL -#undef THRUST_COMP_DEPR_IMPL0 -#undef THRUST_COMP_DEPR_IMPL1 diff --git a/thrust/thrust/detail/cpp14_required.h b/thrust/thrust/detail/cpp14_required.h deleted file mode 100644 index 62894c1fc95..00000000000 --- a/thrust/thrust/detail/cpp14_required.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2018 NVIDIA Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) -# pragma GCC system_header -#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) -# pragma clang system_header -#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) -# pragma system_header -#endif // no system header - -#ifndef THRUST_CPP14_REQUIRED_NO_ERROR -# if _CCCL_STD_VER < 2014 -# error C++14 is required for this Thrust feature; please upgrade your compiler or pass the appropriate -std=c++14 flag to it. -# endif -#endif diff --git a/thrust/thrust/detail/event_error.h b/thrust/thrust/detail/event_error.h index 60f8bb9f92a..fb9e6c27b89 100644 --- a/thrust/thrust/detail/event_error.h +++ b/thrust/thrust/detail/event_error.h @@ -28,7 +28,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/future.h b/thrust/thrust/future.h index 39f25a0b0c0..46f70d58f58 100644 --- a/thrust/thrust/future.h +++ b/thrust/thrust/future.h @@ -29,7 +29,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/copy.h b/thrust/thrust/system/cuda/detail/async/copy.h index 39c3b647cba..d73724de621 100644 --- a/thrust/thrust/system/cuda/detail/async/copy.h +++ b/thrust/thrust/system/cuda/detail/async/copy.h @@ -38,7 +38,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/customization.h b/thrust/thrust/system/cuda/detail/async/customization.h index e1f3786d20d..9ce296267b2 100644 --- a/thrust/thrust/system/cuda/detail/async/customization.h +++ b/thrust/thrust/system/cuda/detail/async/customization.h @@ -38,7 +38,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/exclusive_scan.h b/thrust/thrust/system/cuda/detail/async/exclusive_scan.h index 8f534c3c626..19758e28405 100644 --- a/thrust/thrust/system/cuda/detail/async/exclusive_scan.h +++ b/thrust/thrust/system/cuda/detail/async/exclusive_scan.h @@ -36,7 +36,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/for_each.h b/thrust/thrust/system/cuda/detail/async/for_each.h index 412c0c36408..3e2f6ee25c0 100644 --- a/thrust/thrust/system/cuda/detail/async/for_each.h +++ b/thrust/thrust/system/cuda/detail/async/for_each.h @@ -39,7 +39,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/inclusive_scan.h b/thrust/thrust/system/cuda/detail/async/inclusive_scan.h index d7e4c8a94c7..bc7f9165a6c 100644 --- a/thrust/thrust/system/cuda/detail/async/inclusive_scan.h +++ b/thrust/thrust/system/cuda/detail/async/inclusive_scan.h @@ -36,7 +36,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/reduce.h b/thrust/thrust/system/cuda/detail/async/reduce.h index 8842540b985..fc65efb0f9f 100644 --- a/thrust/thrust/system/cuda/detail/async/reduce.h +++ b/thrust/thrust/system/cuda/detail/async/reduce.h @@ -40,7 +40,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/scan.h b/thrust/thrust/system/cuda/detail/async/scan.h index f64015c0921..278f97d8388 100644 --- a/thrust/thrust/system/cuda/detail/async/scan.h +++ b/thrust/thrust/system/cuda/detail/async/scan.h @@ -37,6 +37,5 @@ # pragma system_header #endif // no system header -#include #include #include diff --git a/thrust/thrust/system/cuda/detail/async/sort.h b/thrust/thrust/system/cuda/detail/async/sort.h index 3bb5207127b..a37514cdf5a 100644 --- a/thrust/thrust/system/cuda/detail/async/sort.h +++ b/thrust/thrust/system/cuda/detail/async/sort.h @@ -38,7 +38,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/async/transform.h b/thrust/thrust/system/cuda/detail/async/transform.h index d987f5c67c5..1f0f4d57f7d 100644 --- a/thrust/thrust/system/cuda/detail/async/transform.h +++ b/thrust/thrust/system/cuda/detail/async/transform.h @@ -38,7 +38,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/detail/future.inl b/thrust/thrust/system/cuda/detail/future.inl index 7200e51d491..da2347e3552 100644 --- a/thrust/thrust/system/cuda/detail/future.inl +++ b/thrust/thrust/system/cuda/detail/future.inl @@ -17,7 +17,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014 diff --git a/thrust/thrust/system/cuda/future.h b/thrust/thrust/system/cuda/future.h index 3ecd9307038..71f4f94181b 100644 --- a/thrust/thrust/system/cuda/future.h +++ b/thrust/thrust/system/cuda/future.h @@ -14,7 +14,6 @@ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) # pragma system_header #endif // no system header -#include #if _CCCL_STD_VER >= 2014