diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tags.h b/Arrangement_on_surface_2/include/CGAL/Arr_tags.h index 1aac0615585..8ba336b1e19 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tags.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tags.h @@ -252,7 +252,7 @@ template struct Arr_is_side_oblivious { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef std::conditional result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -260,7 +260,7 @@ template struct Arr_is_side_open { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef std::conditional result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -268,7 +268,7 @@ template struct Arr_is_side_identified { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef std::conditional result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -276,7 +276,7 @@ template struct Arr_is_side_contracted { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef std::conditional result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -284,7 +284,7 @@ template struct Arr_is_side_closed { typedef ArrSideCategory Side_cat; typedef std::is_same Is_same; - typedef std::conditional result; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -423,11 +423,12 @@ struct Arr_sane_identified_tagging { typedef boost::mpl::or_ LR_ok; typedef boost::mpl::or_ BT_ok; - /*! Boolean tag that is bool_ if opposite sides are either + /*! Boolean tag that is bool_constant if opposite sides are either * both identified or both not-identified, - * otherwise bool_ + * otherwise bool_constant */ - typedef boost::mpl::and_ result; + typedef std::bool_constant result; static constexpr bool value = result::value; }; @@ -447,10 +448,10 @@ struct Arr_has_identified_sides { typedef typename Arr_is_side_identified::result Side_one_ide; typedef typename Arr_is_side_identified::result Side_two_ide; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! 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::result Side_one_con; typedef typename Arr_is_side_contracted::result Side_two_con; - /*!\ Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*!\ Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! 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::result Side_one_clo; typedef typename Arr_is_side_closed::result Side_two_clo; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! 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::result Side_one_ope; typedef typename Arr_is_side_open::result Side_two_ope; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Categorizes two boundary sides: diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h index 283b2dc66b5..9bcabf985d6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h @@ -58,11 +58,11 @@ public: private: - typedef std::conditional< + typedef std::conditional_t< std::is_same_v< Arr_smaller_implementation_tag, Arr_use_traits_tag >, 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::true_type, std::false_type > Larger_traits; @@ -71,7 +71,8 @@ public: //! the result type (if one side asks for traits, then ask traits! //! Or vice versa: If both ask for dummy, then dummy!) 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; }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index ee072c95778..5bc8054c525 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -64,7 +64,7 @@ namespace Ss2 = Surface_sweep_2; // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template @@ -135,7 +135,7 @@ void insert(Arrangement_on_surface_2& arr, // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // // template &, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template @@ -463,7 +463,7 @@ void insert(Arrangement_on_surface_2& arr, // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template @@ -1524,7 +1524,7 @@ zone(Arrangement_on_surface_2& arr, // 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<>&, -// 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 @@ -1562,7 +1562,7 @@ do_intersect(Arrangement_on_surface_2& arr, // // 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 diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h index 30c8b38b4a0..06052a8f19d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h @@ -295,7 +295,7 @@ protected: * \param tag The tag used for dispatching. */ void _map_boundary_vertices(Event* event, Vertex_handle v, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update the boundary vertices map. @@ -306,7 +306,7 @@ protected: * \param tag The tag used for dispatching. */ void _map_boundary_vertices(Event* event, Vertex_handle v, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created vertex using the overlay traits. @@ -319,7 +319,7 @@ protected: * \param tag The tag used for dispatching. */ void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created vertex using the overlay traits. @@ -331,7 +331,7 @@ protected: * \param tag The tag used for dispatching. */ void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created edge using the overlay traits. @@ -922,7 +922,7 @@ _map_halfedge_and_twin(Halfedge_handle he, // template void Arr_overlay_ss_visitor:: -_map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) +_map_boundary_vertices(Event* event, Vertex_handle v, std::bool_constant) { // Update the red and blue object if the last event on sc is on the boundary. if ((event->parameter_space_in_x() != ARR_INTERIOR) || @@ -960,7 +960,7 @@ _map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) template void Arr_overlay_ss_visitor:: _map_boundary_vertices(Event* /* event */, Vertex_handle /* v */, - boost::mpl::bool_) + std::bool_constant) {} /* Notify the overlay traits about a newly created vertex. @@ -974,7 +974,7 @@ void Arr_overlay_ss_visitor:: _create_vertex(Event* event, Vertex_handle new_v, Subcurve* sc, - boost::mpl::bool_) + std::bool_constant) { const Point_2& pt = event->point(); const Cell_handle_red* red_handle = pt.red_cell_handle(); @@ -1011,7 +1011,7 @@ _create_vertex(Event* event, return; } - _create_vertex(event, new_v, sc, boost::mpl::bool_()); + _create_vertex(event, new_v, sc, std::bool_constant()); } /* Notify the overlay traits about a newly created vertex. */ @@ -1020,7 +1020,7 @@ void Arr_overlay_ss_visitor:: _create_vertex(Event* event, Vertex_handle new_v, Subcurve* sc, - boost::mpl::bool_) + std::bool_constant) { const Point_2& pt = event->point(); const Cell_handle_red* red_handle = pt.red_cell_handle(); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h index f49b92f4c01..f4975fb1428 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h @@ -55,13 +55,13 @@ private: // This function is invoked for traits classes where at least one // boundary is not oblivious and all boundaries are not identified. bool operator()(const Point_2& p1, const Point_2& p2, - boost::mpl::bool_) const + std::bool_constant) const { return (m_traits.compare_xy_2_object()(p1, p2) == CGAL::SMALLER); } // This function should be invoked for traits classes where at least one // boundary is identified. bool operator()(const Point_2& p1, const Point_2& p2, - boost::mpl::bool_) const + std::bool_constant) const { // Compare in y boundaries: CGAL::Arr_parameter_space ps_y1 = diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 4dce0049b1a..7dd7edd0887 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -46,9 +46,9 @@ public: typename boost::property_map::type, typename boost::cgal_no_property::type> type; typedef std::conditional_t::const_type, - typename boost::cgal_no_property::const_type - >::type const_type; + typename boost::property_map::const_type, + typename boost::cgal_no_property::const_type + > const_type; type get_pmap(const PropertyTag& p, PolygonMesh& pmesh) { diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index 1fd71599ad1..e8ab8b8bc43 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -140,7 +140,7 @@ struct Point_accessor typedef ValueType value_type; typedef Handle key_type; - typedef std::conditional_t< std::is_reference, + typedef std::conditional_t< std::is_reference_v, ValueType&, ValueType > Reference; diff --git a/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h b/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h index b1500148b59..c2175bc9439 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h +++ b/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h @@ -206,7 +206,7 @@ public: // Tag_true if COEFF and ROOT are exact typedef std::conditional_t< std::is_same_v::Is_exact,::CGAL::Tag_true> && - std::is_same::Is_exact,::CGAL::Tag_true> + std::is_same_v::Is_exact,::CGAL::Tag_true> ,::CGAL::Tag_true,::CGAL::Tag_false> Is_exact; typedef typename Algebraic_structure_traits::Is_numerical_sensitive diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index e6a2a5dbecf..7f5533f92b7 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -1,4 +1,4 @@ -3// Copyright (c) 2012 INRIA Sophia-Antipolis (France). +// Copyright (c) 2012 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org) diff --git a/STL_Extension/include/CGAL/Container_helper.h b/STL_Extension/include/CGAL/Container_helper.h index aeb66ea052b..9f5ac5a84cb 100644 --- a/STL_Extension/include/CGAL/Container_helper.h +++ b/STL_Extension/include/CGAL/Container_helper.h @@ -50,8 +50,8 @@ void resize(Container& CGAL_assertion_code(array), std::size_t CGAL_assertion_co template void resize(Container&, std::size_t, std::enable_if_t< - !boost::mpl::or_, - has_size >::value >* = nullptr) + !(has_resize::value || + has_size::value)>* = nullptr) { } diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 02b050f790a..3cc57168971 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -95,9 +95,10 @@ namespace internal { template struct Itag { - typedef std::conditional_t<(typename Algebraic_structure_traits::Is_exact)::value, - Exact_intersections_tag, - Exact_predicates_tag> type; + using Is_exact = typename Algebraic_structure_traits::Is_exact; + typedef std::conditional_t type; }; } // namespace internal