fix compilation issues

This commit is contained in:
Sébastien Loriot 2023-11-05 22:52:44 -08:00
parent 8700394122
commit 3176178224
11 changed files with 57 additions and 51 deletions

View File

@ -252,7 +252,7 @@ template <typename ArrSideCategory>
struct Arr_is_side_oblivious { struct Arr_is_side_oblivious {
typedef ArrSideCategory Side_cat; typedef ArrSideCategory Side_cat;
typedef std::is_same<Side_cat, Arr_oblivious_side_tag> Is_same; typedef std::is_same<Side_cat, Arr_oblivious_side_tag> Is_same;
typedef std::conditional<Is_same::value, Arr_true, Arr_false> result; typedef std::bool_constant<Is_same::value> result;
typedef typename result::type type; typedef typename result::type type;
}; };
@ -260,7 +260,7 @@ template <typename ArrSideCategory>
struct Arr_is_side_open { struct Arr_is_side_open {
typedef ArrSideCategory Side_cat; typedef ArrSideCategory Side_cat;
typedef std::is_same<Side_cat, Arr_open_side_tag> Is_same; typedef std::is_same<Side_cat, Arr_open_side_tag> Is_same;
typedef std::conditional<Is_same,::value Arr_true, Arr_false> result; typedef std::bool_constant<Is_same::value> result;
typedef typename result::type type; typedef typename result::type type;
}; };
@ -268,7 +268,7 @@ template <typename ArrSideCategory>
struct Arr_is_side_identified { struct Arr_is_side_identified {
typedef ArrSideCategory Side_cat; typedef ArrSideCategory Side_cat;
typedef std::is_same<Side_cat, Arr_identified_side_tag> Is_same; typedef std::is_same<Side_cat, Arr_identified_side_tag> Is_same;
typedef std::conditional<Is_same::value, Arr_true, Arr_false> result; typedef std::bool_constant<Is_same::value> result;
typedef typename result::type type; typedef typename result::type type;
}; };
@ -276,7 +276,7 @@ template <typename ArrSideCategory>
struct Arr_is_side_contracted { struct Arr_is_side_contracted {
typedef ArrSideCategory Side_cat; typedef ArrSideCategory Side_cat;
typedef std::is_same<Side_cat, Arr_contracted_side_tag> Is_same; typedef std::is_same<Side_cat, Arr_contracted_side_tag> Is_same;
typedef std::conditional<Is_same::value, Arr_true, Arr_false> result; typedef std::bool_constant<Is_same::value> result;
typedef typename result::type type; typedef typename result::type type;
}; };
@ -284,7 +284,7 @@ template <typename ArrSideCategory>
struct Arr_is_side_closed { struct Arr_is_side_closed {
typedef ArrSideCategory Side_cat; typedef ArrSideCategory Side_cat;
typedef std::is_same<Side_cat, Arr_closed_side_tag> Is_same; typedef std::is_same<Side_cat, Arr_closed_side_tag> Is_same;
typedef std::conditional<Is_same::value, Arr_true, Arr_false> result; typedef std::bool_constant<Is_same::value> result;
typedef typename result::type type; typedef typename result::type type;
}; };
@ -423,11 +423,12 @@ struct Arr_sane_identified_tagging {
typedef boost::mpl::or_<LR_ide, LR_not_ide> LR_ok; typedef boost::mpl::or_<LR_ide, LR_not_ide> LR_ok;
typedef boost::mpl::or_<BT_ide, BT_not_ide> BT_ok; typedef boost::mpl::or_<BT_ide, BT_not_ide> BT_ok;
/*! Boolean tag that is bool_<true> if opposite sides are either /*! Boolean tag that is bool_constant<true> if opposite sides are either
* both identified or both not-identified, * both identified or both not-identified,
* otherwise bool_<false> * otherwise bool_constant<false>
*/ */
typedef boost::mpl::and_<LR_ok, BT_ok> result; typedef std::bool_constant<LR_ok::value &&
BT_ok::value> result;
static constexpr bool value = result::value; static constexpr bool value = result::value;
}; };
@ -447,10 +448,10 @@ struct Arr_has_identified_sides {
typedef typename Arr_is_side_identified<Side_one_cat>::result Side_one_ide; typedef typename Arr_is_side_identified<Side_one_cat>::result Side_one_ide;
typedef typename Arr_is_side_identified<Side_two_cat>::result Side_two_ide; typedef typename Arr_is_side_identified<Side_two_cat>::result Side_two_ide;
/*! Boolean tag that is bool_<true> if one side is identified, /*! Boolean tag that is bool_constant<true> if one side is identified,
* otherwise bool_<false> * otherwise bool_constant<false>
*/ */
typedef boost::mpl::or_<Side_one_ide, Side_two_ide> result; typedef std::bool_constant<Side_one_ide::value || Side_two_ide::value> result;
}; };
/*! Checks whether one of two boundary sides are contracted /*! Checks whether one of two boundary sides are contracted
@ -463,10 +464,11 @@ struct Arr_has_contracted_sides_two {
typedef typename Arr_is_side_contracted<Side_one_cat>::result Side_one_con; typedef typename Arr_is_side_contracted<Side_one_cat>::result Side_one_con;
typedef typename Arr_is_side_contracted<Side_two_cat>::result Side_two_con; typedef typename Arr_is_side_contracted<Side_two_cat>::result Side_two_con;
/*!\ Boolean tag that is bool_<true> if one side is identified, /*!\ Boolean tag that is bool_constant<true> if one side is identified,
* otherwise bool_<false> * otherwise bool_constant<false>
*/ */
typedef boost::mpl::or_<Side_one_con, Side_two_con> result; typedef std::bool_constant<Side_one_con::value ||
Side_two_con::value> result;
}; };
/*! Checks whether one of two boundary sides are closed /*! Checks whether one of two boundary sides are closed
@ -479,10 +481,11 @@ struct Arr_has_closed_sides_two {
typedef typename Arr_is_side_closed<Side_one_cat>::result Side_one_clo; typedef typename Arr_is_side_closed<Side_one_cat>::result Side_one_clo;
typedef typename Arr_is_side_closed<Side_two_cat>::result Side_two_clo; typedef typename Arr_is_side_closed<Side_two_cat>::result Side_two_clo;
/*! Boolean tag that is bool_<true> if one side is identified, /*! Boolean tag that is bool_constant<true> if one side is identified,
* otherwise bool_<false> * otherwise bool_constant<false>
*/ */
typedef boost::mpl::or_<Side_one_clo, Side_two_clo> result; typedef std::bool_constant<Side_one_clo::value ||
Side_two_clo::value> result;
}; };
/*! Checks whether one of two boundary sides are open /*! Checks whether one of two boundary sides are open
@ -495,10 +498,11 @@ struct Arr_has_open_sides_two {
typedef typename Arr_is_side_open<Side_one_cat>::result Side_one_ope; typedef typename Arr_is_side_open<Side_one_cat>::result Side_one_ope;
typedef typename Arr_is_side_open<Side_two_cat>::result Side_two_ope; typedef typename Arr_is_side_open<Side_two_cat>::result Side_two_ope;
/*! Boolean tag that is bool_<true> if one side is identified, /*! Boolean tag that is bool_constant<true> if one side is identified,
* otherwise bool_<false> * otherwise bool_constant<false>
*/ */
typedef boost::mpl::or_<Side_one_ope, Side_two_ope> result; typedef std::bool_constant<Side_one_ope::value ||
Side_two_ope::value> result;
}; };
/*! Categorizes two boundary sides: /*! Categorizes two boundary sides:

View File

@ -58,11 +58,11 @@ public:
private: private:
typedef std::conditional< typedef std::conditional_t<
std::is_same_v< Arr_smaller_implementation_tag, Arr_use_traits_tag >, std::is_same_v< Arr_smaller_implementation_tag, Arr_use_traits_tag >,
std::true_type, std::false_type > Smaller_traits; std::true_type, std::false_type > Smaller_traits;
typedef std::conditional_t_< typedef std::conditional_t<
std::is_same_v< Arr_larger_implementation_tag, Arr_use_traits_tag >, std::is_same_v< Arr_larger_implementation_tag, Arr_use_traits_tag >,
std::true_type, std::false_type > Larger_traits; std::true_type, std::false_type > Larger_traits;
@ -71,7 +71,8 @@ public:
//! the result type (if one side asks for traits, then ask traits! //! the result type (if one side asks for traits, then ask traits!
//! Or vice versa: If both ask for dummy, then dummy!) //! Or vice versa: If both ask for dummy, then dummy!)
typedef std::conditional_t< typedef std::conditional_t<
Smaller_traits, Larger_traits >::value || Arr_use_traits_tag::value, Smaller_traits::value || Larger_traits::value,
Arr_use_traits_tag,
Arr_use_dummy_tag > type; Arr_use_dummy_tag > type;
}; };

View File

@ -64,7 +64,7 @@ namespace Ss2 = Surface_sweep_2;
// //
// error: no matching function for call to `do_intersect(Arrangement_2<>&, // error: no matching function for call to `do_intersect(Arrangement_2<>&,
// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&,
// mpl_::bool_< true>)' // std::bool_constant< true>)'
// //
template <typename GeometryTraits_2, typename TopologyTraits, template <typename GeometryTraits_2, typename TopologyTraits,
typename PointLocation, typename ZoneVisitor> typename PointLocation, typename ZoneVisitor>
@ -135,7 +135,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
// //
// error: no matching function for call to `do_intersect(Arrangement_2<>&, // error: no matching function for call to `do_intersect(Arrangement_2<>&,
// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&,
// mpl_::bool_< true>)' // std::bool_constant< true>)'
// //
// //
template <typename GeometryTraits_2, typename TopologyTraits, template <typename GeometryTraits_2, typename TopologyTraits,
@ -409,7 +409,7 @@ void insert_non_empty(Arrangement_on_surface_2<GeometryTraits_2,
// //
// error: no matching function for call to `do_intersect(Arrangement_2<>&, // error: no matching function for call to `do_intersect(Arrangement_2<>&,
// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&,
// mpl_::bool_< true>)' // std::bool_constant< true>)'
// //
template <typename GeometryTraits_2, typename TopologyTraits, template <typename GeometryTraits_2, typename TopologyTraits,
typename InputIterator> typename InputIterator>
@ -463,7 +463,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
// //
// error: no matching function for call to `do_intersect(Arrangement_2<>&, // error: no matching function for call to `do_intersect(Arrangement_2<>&,
// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&,
// mpl_::bool_< true>)' // std::bool_constant< true>)'
// //
template <typename GeometryTraits_2, typename TopologyTraits, template <typename GeometryTraits_2, typename TopologyTraits,
typename InputIterator> typename InputIterator>
@ -1524,7 +1524,7 @@ zone(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
// workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // workaround since it didn't compile in FC3_g++-3.4.4 with the error of:
// //
// error: no matching function for call to `do_intersect(Arrangement_on_surface_2<>&, // error: no matching function for call to `do_intersect(Arrangement_on_surface_2<>&,
// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, mpl_::bool_< true>)' // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, std::bool_constant< true>)'
// //
template <typename GeometryTraits_2, typename TopologyTraits, template <typename GeometryTraits_2, typename TopologyTraits,
typename PointLocation> typename PointLocation>
@ -1562,7 +1562,7 @@ do_intersect(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
// //
// error: no matching function for call to // error: no matching function for call to
// `do_intersect(Arrangement_on_surface_2<>&, // `do_intersect(Arrangement_on_surface_2<>&,
// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, mpl_::bool_< true>)' // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, std::bool_constant< true>)'
// //
template <typename GeometryTraits_2, typename TopologyTraits, template <typename GeometryTraits_2, typename TopologyTraits,
typename PointLocation> typename PointLocation>

View File

@ -295,7 +295,7 @@ protected:
* \param tag The tag used for dispatching. * \param tag The tag used for dispatching.
*/ */
void _map_boundary_vertices(Event* event, Vertex_handle v, void _map_boundary_vertices(Event* event, Vertex_handle v,
boost::mpl::bool_<true> /* tag */); std::bool_constant<true> /* tag */);
/*! /*!
* Update the boundary vertices map. * Update the boundary vertices map.
@ -306,7 +306,7 @@ protected:
* \param tag The tag used for dispatching. * \param tag The tag used for dispatching.
*/ */
void _map_boundary_vertices(Event* event, Vertex_handle v, void _map_boundary_vertices(Event* event, Vertex_handle v,
boost::mpl::bool_<false> /* tag */); std::bool_constant<false> /* tag */);
/*! /*!
* Update a newly created vertex using the overlay traits. * Update a newly created vertex using the overlay traits.
@ -319,7 +319,7 @@ protected:
* \param tag The tag used for dispatching. * \param tag The tag used for dispatching.
*/ */
void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc, void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc,
boost::mpl::bool_<true> /* tag */); std::bool_constant<true> /* tag */);
/*! /*!
* Update a newly created vertex using the overlay traits. * Update a newly created vertex using the overlay traits.
@ -331,7 +331,7 @@ protected:
* \param tag The tag used for dispatching. * \param tag The tag used for dispatching.
*/ */
void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc, void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc,
boost::mpl::bool_<false> /* tag */); std::bool_constant<false> /* tag */);
/*! /*!
* Update a newly created edge using the overlay traits. * Update a newly created edge using the overlay traits.
@ -922,7 +922,7 @@ _map_halfedge_and_twin(Halfedge_handle he,
// //
template <typename OvlHlpr, typename OvlTr, typename Vis> template <typename OvlHlpr, typename OvlTr, typename Vis>
void Arr_overlay_ss_visitor<OvlHlpr, OvlTr, Vis>:: void Arr_overlay_ss_visitor<OvlHlpr, OvlTr, Vis>::
_map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_<true>) _map_boundary_vertices(Event* event, Vertex_handle v, std::bool_constant<true>)
{ {
// Update the red and blue object if the last event on sc is on the boundary. // Update the red and blue object if the last event on sc is on the boundary.
if ((event->parameter_space_in_x() != ARR_INTERIOR) || if ((event->parameter_space_in_x() != ARR_INTERIOR) ||
@ -960,7 +960,7 @@ _map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_<true>)
template <typename OvlHlpr, typename OvlTr, typename Vis> template <typename OvlHlpr, typename OvlTr, typename Vis>
void Arr_overlay_ss_visitor<OvlHlpr, OvlTr, Vis>:: void Arr_overlay_ss_visitor<OvlHlpr, OvlTr, Vis>::
_map_boundary_vertices(Event* /* event */, Vertex_handle /* v */, _map_boundary_vertices(Event* /* event */, Vertex_handle /* v */,
boost::mpl::bool_<false>) std::bool_constant<false>)
{} {}
/* Notify the overlay traits about a newly created vertex. /* Notify the overlay traits about a newly created vertex.
@ -974,7 +974,7 @@ void Arr_overlay_ss_visitor<OvlHlpr, OvlTr, Vis>::
_create_vertex(Event* event, _create_vertex(Event* event,
Vertex_handle new_v, Vertex_handle new_v,
Subcurve* sc, Subcurve* sc,
boost::mpl::bool_<true>) std::bool_constant<true>)
{ {
const Point_2& pt = event->point(); const Point_2& pt = event->point();
const Cell_handle_red* red_handle = pt.red_cell_handle(); const Cell_handle_red* red_handle = pt.red_cell_handle();
@ -1011,7 +1011,7 @@ _create_vertex(Event* event,
return; return;
} }
_create_vertex(event, new_v, sc, boost::mpl::bool_<false>()); _create_vertex(event, new_v, sc, std::bool_constant<false>());
} }
/* Notify the overlay traits about a newly created vertex. */ /* Notify the overlay traits about a newly created vertex. */
@ -1020,7 +1020,7 @@ void Arr_overlay_ss_visitor<OvlHlpr, OvlTr, Vis>::
_create_vertex(Event* event, _create_vertex(Event* event,
Vertex_handle new_v, Vertex_handle new_v,
Subcurve* sc, Subcurve* sc,
boost::mpl::bool_<false>) std::bool_constant<false>)
{ {
const Point_2& pt = event->point(); const Point_2& pt = event->point();
const Cell_handle_red* red_handle = pt.red_cell_handle(); const Cell_handle_red* red_handle = pt.red_cell_handle();

View File

@ -55,13 +55,13 @@ private:
// This function is invoked for traits classes where at least one // This function is invoked for traits classes where at least one
// boundary is not oblivious and all boundaries are not identified. // boundary is not oblivious and all boundaries are not identified.
bool operator()(const Point_2& p1, const Point_2& p2, bool operator()(const Point_2& p1, const Point_2& p2,
boost::mpl::bool_<false>) const std::bool_constant<false>) const
{ return (m_traits.compare_xy_2_object()(p1, p2) == CGAL::SMALLER); } { return (m_traits.compare_xy_2_object()(p1, p2) == CGAL::SMALLER); }
// This function should be invoked for traits classes where at least one // This function should be invoked for traits classes where at least one
// boundary is identified. // boundary is identified.
bool operator()(const Point_2& p1, const Point_2& p2, bool operator()(const Point_2& p1, const Point_2& p2,
boost::mpl::bool_<true>) const std::bool_constant<true>) const
{ {
// Compare in y boundaries: // Compare in y boundaries:
CGAL::Arr_parameter_space ps_y1 = CGAL::Arr_parameter_space ps_y1 =

View File

@ -46,9 +46,9 @@ public:
typename boost::property_map<PolygonMesh, PropertyTag>::type, typename boost::property_map<PolygonMesh, PropertyTag>::type,
typename boost::cgal_no_property::type> type; typename boost::cgal_no_property::type> type;
typedef std::conditional_t<Has_internal_pmap::value, typedef std::conditional_t<Has_internal_pmap::value,
typename boost::property_map<PolygonMesh, PropertyTag>::const_type, typename boost::property_map<PolygonMesh, PropertyTag>::const_type,
typename boost::cgal_no_property::const_type typename boost::cgal_no_property::const_type
>::type const_type; > const_type;
type get_pmap(const PropertyTag& p, PolygonMesh& pmesh) type get_pmap(const PropertyTag& p, PolygonMesh& pmesh)
{ {

View File

@ -140,7 +140,7 @@ struct Point_accessor<Handle, ValueType, ConstReference, true>
typedef ValueType value_type; typedef ValueType value_type;
typedef Handle key_type; typedef Handle key_type;
typedef std::conditional_t< std::is_reference<ConstReference>, typedef std::conditional_t< std::is_reference_v<ConstReference>,
ValueType&, ValueType&,
ValueType > Reference; ValueType > Reference;

View File

@ -206,7 +206,7 @@ public:
// Tag_true if COEFF and ROOT are exact // Tag_true if COEFF and ROOT are exact
typedef std::conditional_t< typedef std::conditional_t<
std::is_same_v<typename CGAL::Algebraic_structure_traits<ROOT_ >::Is_exact,::CGAL::Tag_true> && std::is_same_v<typename CGAL::Algebraic_structure_traits<ROOT_ >::Is_exact,::CGAL::Tag_true> &&
std::is_same<typename CGAL::Algebraic_structure_traits<COEFF_>::Is_exact,::CGAL::Tag_true> std::is_same_v<typename CGAL::Algebraic_structure_traits<COEFF_>::Is_exact,::CGAL::Tag_true>
,::CGAL::Tag_true,::CGAL::Tag_false> Is_exact; ,::CGAL::Tag_true,::CGAL::Tag_false> Is_exact;
typedef typename Algebraic_structure_traits<COEFF_>::Is_numerical_sensitive typedef typename Algebraic_structure_traits<COEFF_>::Is_numerical_sensitive

View File

@ -1,4 +1,4 @@
3// Copyright (c) 2012 INRIA Sophia-Antipolis (France). // Copyright (c) 2012 INRIA Sophia-Antipolis (France).
// All rights reserved. // All rights reserved.
// //
// This file is part of CGAL (www.cgal.org) // This file is part of CGAL (www.cgal.org)

View File

@ -50,8 +50,8 @@ void resize(Container& CGAL_assertion_code(array), std::size_t CGAL_assertion_co
template <class Container> template <class Container>
void resize(Container&, std::size_t, void resize(Container&, std::size_t,
std::enable_if_t< std::enable_if_t<
!boost::mpl::or_<has_resize<Container>, !(has_resize<Container>::value ||
has_size<Container> >::value >* = nullptr) has_size<Container>::value)>* = nullptr)
{ {
} }

View File

@ -95,9 +95,10 @@ namespace internal {
template <typename K> template <typename K>
struct Itag { struct Itag {
typedef std::conditional_t<(typename Algebraic_structure_traits<typename K::FT>::Is_exact)::value, using Is_exact = typename Algebraic_structure_traits<typename K::FT>::Is_exact;
Exact_intersections_tag, typedef std::conditional_t<Is_exact::value,
Exact_predicates_tag> type; Exact_intersections_tag,
Exact_predicates_tag> type;
}; };
} // namespace internal } // namespace internal