diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index 3754a4439d4..7c505ea5165 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -467,16 +467,6 @@ namespace CGAL { typename Helper::Attribute_containers mattribute_containers; }; -#ifndef CGAL_CXX17 - template - constexpr typename Combinatorial_map_storage_1::Null_descriptor_type - Combinatorial_map_storage_1::null_descriptor; - - template - constexpr typename Combinatorial_map_storage_1::Null_descriptor_type - Combinatorial_map_storage_1::null_handle; -#endif - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Generalized_map/include/CGAL/Generalized_map_storages.h b/Generalized_map/include/CGAL/Generalized_map_storages.h index d14cc8ea17c..4f40c0a922c 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages.h @@ -457,17 +457,6 @@ namespace CGAL { /// Tuple of attributes containers typename Helper::Attribute_containers mattribute_containers; }; - -#ifndef CGAL_CXX17 - template - constexpr typename Generalized_map_storage_1::Null_descriptor_type - Generalized_map_storage_1::null_descriptor; - - template - constexpr typename Generalized_map_storage_1::Null_descriptor_type - Generalized_map_storage_1::null_handle; -#endif - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index d48250f1dc1..0286ae133c1 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -36,11 +36,6 @@ # define WIN64 #endif -#ifdef _MSC_VER -#define _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING 1 -#define _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING 1 -#endif - #ifdef CGAL_INCLUDE_WINDOWS_DOT_H // Mimic users including this file which defines min max macros // and other names leading to name clashes @@ -147,8 +142,8 @@ #endif // Same for C++17 -#if __cplusplus >= 201703L || _MSVC_LANG >= 201703L -# define CGAL_CXX17 1 +#if !(__cplusplus >= 201703L || _MSVC_LANG >= 201703L) +#error "CGAL requires C++ 17" #endif // Same for C++20 #if __cplusplus >= 202002L || _MSVC_LANG >= 202002L diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h index 6e6884ecbcf..1ec9a1d66af 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h @@ -502,17 +502,6 @@ namespace CGAL { typename Helper::Attribute_containers mattribute_containers; }; -#ifndef CGAL_CXX17 - template - constexpr typename CMap_linear_cell_complex_storage_1::Null_descriptor_type - CMap_linear_cell_complex_storage_1::null_descriptor; - - template - constexpr typename CMap_linear_cell_complex_storage_1::Null_descriptor_type - CMap_linear_cell_complex_storage_1::null_handle; -#endif } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index ca73368b34a..c2331a6acfb 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -493,18 +493,6 @@ namespace CGAL { typename Helper::Attribute_containers mattribute_containers; }; -#ifndef CGAL_CXX17 - template - constexpr typename GMap_linear_cell_complex_storage_1::Null_descriptor_type - GMap_linear_cell_complex_storage_1::null_descriptor; - - template - constexpr typename GMap_linear_cell_complex_storage_1::Null_descriptor_type - GMap_linear_cell_complex_storage_1::null_handle; -#endif - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Matrix_search/include/CGAL/Cartesian_matrix.h b/Matrix_search/include/CGAL/Cartesian_matrix.h index 1aa192ab2c8..be3dba778b4 100644 --- a/Matrix_search/include/CGAL/Cartesian_matrix.h +++ b/Matrix_search/include/CGAL/Cartesian_matrix.h @@ -28,11 +28,7 @@ template < class Operation, class Cartesian_matrix { public: -#if CGAL_CXX17 && __has_cpp_attribute(nodiscard) typedef typename std::invoke_result::value_type, typename std::iterator_traits::value_type>::type Value; -#else - typedef typename Operation::result_type Value; -#endif Cartesian_matrix(RandomAccessIC_row r_f, RandomAccessIC_row r_l, diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index 8e86644477b..6a812e5581b 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -1572,17 +1572,10 @@ private: Cell_vector c3t3_cells(const Cell_vector& cells) const { Cell_vector c3t3_cells; -#ifdef CGAL_CXX17 std::remove_copy_if(cells.begin(), cells.end(), std::back_inserter(c3t3_cells), std::not_fn(Is_in_c3t3(c3t3_))); -#else - std::remove_copy_if(cells.begin(), - cells.end(), - std::back_inserter(c3t3_cells), - std::not1(Is_in_c3t3(c3t3_)) ); -#endif return c3t3_cells; } @@ -3665,17 +3658,10 @@ incident_slivers(const Vertex_handle& v, std::vector incident_cells_; tr_.incident_cells(v, std::back_inserter(incident_cells_)); -#ifdef CGAL_CXX17 std::remove_copy_if(incident_cells_.begin(), incident_cells_.end(), out, std::not_fn(Is_sliver(c3t3_, criterion, sliver_bound))); -#else - std::remove_copy_if(incident_cells_.begin(), - incident_cells_.end(), - out, - std::not1(Is_sliver(c3t3_,criterion,sliver_bound))); -#endif return out; }