remove CGAL_CXX17 macro

... and no longer used macros
This commit is contained in:
Sébastien Loriot 2023-04-28 22:50:53 +02:00
parent 852b3b664b
commit e54408370b
7 changed files with 2 additions and 69 deletions

View File

@ -467,16 +467,6 @@ namespace CGAL {
typename Helper::Attribute_containers mattribute_containers;
};
#ifndef CGAL_CXX17
template<unsigned int d_, class Items_, class Alloc_>
constexpr typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Null_descriptor_type
Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_descriptor;
template<unsigned int d_, class Items_, class Alloc_>
constexpr typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Null_descriptor_type
Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_handle;
#endif
} // namespace CGAL
#if defined(BOOST_GCC)

View File

@ -457,17 +457,6 @@ namespace CGAL {
/// Tuple of attributes containers
typename Helper::Attribute_containers mattribute_containers;
};
#ifndef CGAL_CXX17
template<unsigned int d_, class Items_, class Alloc_>
constexpr typename Generalized_map_storage_1<d_, Items_, Alloc_>::Null_descriptor_type
Generalized_map_storage_1<d_, Items_, Alloc_>::null_descriptor;
template<unsigned int d_, class Items_, class Alloc_>
constexpr typename Generalized_map_storage_1<d_, Items_, Alloc_>::Null_descriptor_type
Generalized_map_storage_1<d_, Items_, Alloc_>::null_handle;
#endif
} // namespace CGAL
#if defined(BOOST_GCC)

View File

@ -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

View File

@ -502,17 +502,6 @@ namespace CGAL {
typename Helper::Attribute_containers mattribute_containers;
};
#ifndef CGAL_CXX17
template<unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_>
constexpr typename CMap_linear_cell_complex_storage_1<d_,ambient_dim, Traits_, Items_, Alloc_>::Null_descriptor_type
CMap_linear_cell_complex_storage_1<d_,ambient_dim, Traits_, Items_, Alloc_>::null_descriptor;
template<unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_>
constexpr typename CMap_linear_cell_complex_storage_1<d_,ambient_dim, Traits_, Items_, Alloc_>::Null_descriptor_type
CMap_linear_cell_complex_storage_1<d_,ambient_dim, Traits_, Items_, Alloc_>::null_handle;
#endif
} // namespace CGAL
#if defined(BOOST_GCC)

View File

@ -493,18 +493,6 @@ namespace CGAL {
typename Helper::Attribute_containers mattribute_containers;
};
#ifndef CGAL_CXX17
template<unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_>
constexpr typename GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, Items_, Alloc_>::Null_descriptor_type
GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, Items_, Alloc_>::null_descriptor;
template<unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_>
constexpr typename GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, Items_, Alloc_>::Null_descriptor_type
GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, Items_, Alloc_>::null_handle;
#endif
} // namespace CGAL
#if defined(BOOST_GCC)

View File

@ -28,11 +28,7 @@ template < class Operation,
class Cartesian_matrix {
public:
#if CGAL_CXX17 && __has_cpp_attribute(nodiscard)
typedef typename std::invoke_result<Operation, typename std::iterator_traits<RandomAccessIC_row>::value_type, typename std::iterator_traits<RandomAccessIC_column>::value_type>::type Value;
#else
typedef typename Operation::result_type Value;
#endif
Cartesian_matrix(RandomAccessIC_row r_f,
RandomAccessIC_row r_l,

View File

@ -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<Cell_handle>(c3t3_)));
#else
std::remove_copy_if(cells.begin(),
cells.end(),
std::back_inserter(c3t3_cells),
std::not1(Is_in_c3t3<Cell_handle>(c3t3_)) );
#endif
return c3t3_cells;
}
@ -3665,17 +3658,10 @@ incident_slivers(const Vertex_handle& v,
std::vector<Cell_handle> 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<Sc>(c3t3_, criterion, sliver_bound)));
#else
std::remove_copy_if(incident_cells_.begin(),
incident_cells_.end(),
out,
std::not1(Is_sliver<Sc>(c3t3_,criterion,sliver_bound)));
#endif
return out;
}