From 71b4e4f08f72a0724bfcf9fad0f24252539b7dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Apr 2023 20:27:13 +0200 Subject: [PATCH] boost::shared_ptr => std::shared_ptr --- CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp | 5 +- .../random-forest/common-libraries.hpp | 2 +- .../Feature/Gradient_of_feature.h | 2 +- GraphicsView/demo/Polygon/Polygon_2.cpp | 5 +- Installation/CHANGES.md | 1 + .../examples/Point_set_3/point_set_algo.cpp | 2 +- .../Classification/Cluster_classification.h | 4 +- .../Point_set_average_spacing_plugin.cpp | 2 +- .../Point_set_bilateral_smoothing_plugin.cpp | 2 +- .../Point_set/Point_set_clustering_plugin.cpp | 2 +- .../Point_set_outliers_removal_plugin.cpp | 2 +- .../Point_set/Point_set_selection_plugin.cpp | 4 +- .../Point_set_shape_detection_plugin.cpp | 10 ++-- .../Point_set_simplification_plugin.cpp | 6 +-- .../Point_set/Point_set_wlop_plugin.cpp | 2 +- .../include/run_with_qprogressdialog.h | 8 ++-- .../efficient_RANSAC_with_point_access.cpp | 2 +- .../Efficient_RANSAC/Efficient_RANSAC.h | 44 ++++++++--------- .../Efficient_RANSAC/property_map.h | 6 +-- .../test_efficient_RANSAC_cone_parameters.cpp | 2 +- ...t_efficient_RANSAC_cylinder_parameters.cpp | 2 +- ...test_efficient_RANSAC_plane_parameters.cpp | 2 +- .../test_efficient_RANSAC_scene.cpp | 2 +- ...est_efficient_RANSAC_sphere_parameters.cpp | 2 +- ...test_efficient_RANSAC_torus_parameters.cpp | 2 +- ...ompare_kernels_simple_polygon_skeleton.cpp | 4 +- .../create_exterior_skeleton.cpp | 6 +-- ...te_exterior_skeleton_tweaking_skeleton.cpp | 6 +-- .../CGAL/Polygon_offset_builder_2.h | 4 +- .../CGAL/Straight_skeleton_builder_2.h | 4 +- .../CGAL/Straight_skeleton_converter_2.h | 4 +- .../CGAL/arrange_offset_polygons_2.h | 6 +-- .../CGAL/create_offset_polygons_2.h | 8 ++-- ...ffset_polygons_from_polygon_with_holes_2.h | 4 +- .../CGAL/create_straight_skeleton_2.h | 10 ++-- .../Straight_skeleton_2.txt | 4 +- .../Create_offset_polygons_2.cpp | 6 +-- .../Create_saop_from_polygon_with_holes_2.cpp | 6 +-- .../Create_skeleton_and_offset_polygons_2.cpp | 6 +-- ...leton_and_offset_polygons_with_holes_2.cpp | 4 +- .../Create_straight_skeleton_2.cpp | 4 +- ...ght_skeleton_from_polygon_with_holes_2.cpp | 4 +- .../Straight_skeleton_2/Low_level_API.cpp | 6 +-- .../Show_offset_polygon.cpp | 4 +- .../Show_straight_skeleton.cpp | 4 +- .../draw_straight_skeleton_2.cpp | 4 +- .../Straight_skeleton_2/dump_to_eps.h | 4 +- ...offset_of_multiple_polygons_with_holes.cpp | 6 +-- .../examples/Straight_skeleton_2/print.h | 8 ++-- .../include/CGAL/Polygon_offset_builder_2.h | 4 +- .../Straight_skeleton_2/Polygon_iterators.h | 14 +++--- .../CGAL/Straight_skeleton_builder_2.h | 4 +- .../CGAL/Straight_skeleton_converter_2.h | 8 ++-- .../include/CGAL/arrange_offset_polygons_2.h | 16 +++---- .../include/CGAL/create_offset_polygons_2.h | 40 ++++++++-------- ...ffset_polygons_from_polygon_with_holes_2.h | 26 +++++----- .../include/CGAL/create_straight_skeleton_2.h | 24 +++++----- ...aight_skeleton_from_polygon_with_holes_2.h | 4 +- .../include/CGAL/test_offset_builder_types.h | 8 ++-- .../include/CGAL/test_sls_builder_types.h | 8 ++-- .../include/CGAL/test_sls_types.h | 14 +++--- .../test/Straight_skeleton_2/issue4533.cpp | 4 +- .../test/Straight_skeleton_2/issue4684.cpp | 4 +- .../test/Straight_skeleton_2/issue7149.cpp | 2 +- .../test/Straight_skeleton_2/print.h | 8 ++-- .../Straight_skeleton_2/test_sls_offset.cpp | 48 +++++++++---------- .../Straight_skeleton_2/test_sls_simple.cpp | 10 ++-- .../test_straight_skeleton_copy.cpp | 6 +-- .../internal/Geometry_container.h | 4 +- 69 files changed, 246 insertions(+), 259 deletions(-) diff --git a/CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp b/CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp index 7d2026c5981..71557e65968 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/skeleton.cpp @@ -11,7 +11,6 @@ // Author(s) : Sebastien Loriot, Sylvain Pion #include -#include #include #include #include @@ -38,10 +37,10 @@ const std::string Hmsg[] = { class SkeletonIpelet : public CGAL::Ipelet_base{ - typedef boost::shared_ptr PolygonPtr ; + typedef std::shared_ptr PolygonPtr ; typedef std::vector PolygonPtrVector ; typedef CGAL::Straight_skeleton_2 Skeleton ; - typedef boost::shared_ptr SkeletonPtr ; + typedef std::shared_ptr SkeletonPtr ; void draw_straight_skeleton(const Skeleton& skeleton,double); diff --git a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp index c20b9b7155f..6d2ebb01acf 100644 --- a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp +++ b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp @@ -45,7 +45,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h b/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h index 85d703c5ed1..d87ee8f2830 100644 --- a/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h +++ b/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h @@ -37,7 +37,7 @@ class Gradient_of_feature : public Feature_base const InputRange& m_input; ItemMap m_map; Feature_handle m_feature; - boost::shared_ptr m_query; + std::shared_ptr m_query; public: /*! diff --git a/GraphicsView/demo/Polygon/Polygon_2.cpp b/GraphicsView/demo/Polygon/Polygon_2.cpp index 9463c2e979b..67c16d0b3dc 100644 --- a/GraphicsView/demo/Polygon/Polygon_2.cpp +++ b/GraphicsView/demo/Polygon/Polygon_2.cpp @@ -1,5 +1,4 @@ #include -#include // CGAL headers #include #include @@ -42,9 +41,9 @@ typedef CGAL::Polygon_with_holes_2 > Polygon_with_holes_2 typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; -typedef boost::shared_ptr PolygonPtr ; +typedef std::shared_ptr PolygonPtr ; typedef std::vector PolygonPtr_vector ; diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index a505215bd00..486f43ea21f 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -10,6 +10,7 @@ Release date: October 2023 - **Breaking change**: C++17 is now required - Support for Visual `C++` 14.0 (Visual studio 2015) is dropped. +- **Breaking change**: The usage of `boost::shared_ptr` has been replaced by `std::shared_ptr`. Packages affected are 2D Straight Line Skeleton and Shape Detection. [Release 5.6](https://github.com/CGAL/cgal/releases/tag/v5.6) diff --git a/Point_set_3/examples/Point_set_3/point_set_algo.cpp b/Point_set_3/examples/Point_set_3/point_set_algo.cpp index 12c98682475..19f10f5ecfb 100644 --- a/Point_set_3/examples/Point_set_3/point_set_algo.cpp +++ b/Point_set_3/examples/Point_set_3/point_set_algo.cpp @@ -68,7 +68,7 @@ int main (int, char**) parameters.normal_threshold = 0.9; ransac.detect(parameters); - for(boost::shared_ptr shape : ransac.shapes()) + for(std::shared_ptr shape : ransac.shapes()) if (Sphere* sphere = dynamic_cast(shape.get())) std::cerr << "Detected sphere of center " << sphere->center() // Center should be approx 0, 0, 0 << " and of radius " << sphere->radius() << std::endl; // Radius should be approx 1 diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.h b/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.h index 224a66d20c7..ef4d006e2ce 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/Cluster_classification.h @@ -98,7 +98,7 @@ class Cluster_classification : public Item_classification_base void add_cluster_features () { - m_eigen = boost::make_shared + m_eigen = std::make_shared (Local_eigen_analysis::create_from_point_clusters(m_clusters, Concurrency_tag())); @@ -388,7 +388,7 @@ class Cluster_classification : public Item_classification_base int m_index_color; - boost::shared_ptr m_eigen; + std::shared_ptr m_eigen; bool m_input_is_las; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp index d11f45cd623..78c0e2482d4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp @@ -27,7 +27,7 @@ struct Compute_average_spacing_functor { Point_set* points; const int nb_neighbors; - boost::shared_ptr result; + std::shared_ptr result; Compute_average_spacing_functor (Point_set* points, const int nb_neighbors) : points (points), nb_neighbors (nb_neighbors), result (new double(0)) { } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp index c4a13af368d..03f18810236 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp @@ -29,7 +29,7 @@ struct Bilateral_smoothing_functor Point_set* points; unsigned int neighborhood_size; unsigned int sharpness_angle; - boost::shared_ptr result; + std::shared_ptr result; Bilateral_smoothing_functor (Point_set* points, unsigned int neighborhood_size, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp index e898807835f..b998a35750e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_clustering_plugin.cpp @@ -29,7 +29,7 @@ struct Clustering_functor Point_set* points; Point_set::Property_map cluster_map; const double neighbor_radius; - boost::shared_ptr result; + std::shared_ptr result; Clustering_functor (Point_set* points, const double neighbor_radius, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp index 925195e38d4..c18343a17a9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp @@ -26,7 +26,7 @@ struct Outlier_removal_functor int nb_neighbors; double removed_percentage; double distance_threshold; - boost::shared_ptr result; + std::shared_ptr result; Outlier_removal_functor (Point_set* points, int nb_neighbors, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp index 185ce8930fc..634ae8c699b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp @@ -332,7 +332,7 @@ class Neighborhood typedef CGAL::Fuzzy_sphere Sphere; Scene_points_with_normal_item* points_item; - boost::shared_ptr tree; + std::shared_ptr tree; public: @@ -351,7 +351,7 @@ public: { this->points_item = points_item; - tree = boost::make_shared (points_item->point_set()->begin(), + tree = std::make_shared (points_item->point_set()->begin(), points_item->point_set()->end(), Tree::Splitter(), Search_traits (points_item->point_set()->point_map())); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp index fc344cec857..b8117997037 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp @@ -440,7 +440,7 @@ private: Scene_surface_mesh_item* sm_item = nullptr; sm_item = new Scene_surface_mesh_item; - boost::shared_ptr rg_plane(boost::make_shared(plane)); + std::shared_ptr rg_plane(std::make_shared(plane)); build_alpha_shape( *(point_item->point_set()), rg_plane, sm_item, search_sphere_radius); @@ -656,7 +656,7 @@ private: std::map color_map; int index = 0; - for(boost::shared_ptr shape : ransac.shapes()) + for(std::shared_ptr shape : ransac.shapes()) { CGAL::Shape_detection::Cylinder *cyl; cyl = dynamic_cast *>(shape.get()); @@ -731,7 +731,7 @@ private: { ss << item->name().toStdString() << "_plane_"; - boost::shared_ptr > pshape + std::shared_ptr > pshape = boost::dynamic_pointer_cast > (shape); Kernel::Point_3 ref = CGAL::ORIGIN + pshape->plane_normal (); @@ -901,7 +901,7 @@ private: } template - void build_alpha_shape (Point_set& points, boost::shared_ptr plane, + void build_alpha_shape (Point_set& points, std::shared_ptr plane, Scene_surface_mesh_item* sm_item, double epsilon); }; // end Polyhedron_demo_point_set_shape_detection_plugin @@ -997,7 +997,7 @@ void Polyhedron_demo_point_set_shape_detection_plugin::on_actionDetect_triggered template void Polyhedron_demo_point_set_shape_detection_plugin::build_alpha_shape -(Point_set& points, boost::shared_ptr plane, Scene_surface_mesh_item* sm_item, double epsilon) +(Point_set& points, std::shared_ptr plane, Scene_surface_mesh_item* sm_item, double epsilon) { typedef Kernel::Point_2 Point_2; typedef CGAL::Alpha_shape_vertex_base_2 Vb; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp index cc5431609ac..05eb2d41493 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp @@ -29,7 +29,7 @@ struct Compute_average_spacing_functor { Point_set* points; const int nb_neighbors; - boost::shared_ptr result; + std::shared_ptr result; Compute_average_spacing_functor (Point_set* points, const int nb_neighbors) : points (points), nb_neighbors (nb_neighbors), result (new double(0)) { } @@ -50,7 +50,7 @@ struct Grid_simplify_functor Point_set* points; double grid_size; unsigned int min_points_per_cell; - boost::shared_ptr result; + std::shared_ptr result; Grid_simplify_functor (Point_set* points, double grid_size, unsigned min_points_per_cell) : points (points), grid_size (grid_size), min_points_per_cell(min_points_per_cell) @@ -72,7 +72,7 @@ struct Hierarchy_simplify_functor Point_set* points; unsigned int max_cluster_size; double max_surface_variation; - boost::shared_ptr result; + std::shared_ptr result; Hierarchy_simplify_functor (Point_set* points, double max_cluster_size, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp index 538a48b32b7..519b4fff4ef 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp @@ -27,7 +27,7 @@ struct Compute_average_spacing_functor { Point_set* points; const int nb_neighbors; - boost::shared_ptr result; + std::shared_ptr result; Compute_average_spacing_functor (Point_set* points, const int nb_neighbors) : points (points), nb_neighbors (nb_neighbors), result (new double(0)) { } diff --git a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h index f2657fda3f1..7a6d9744999 100644 --- a/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h +++ b/Polyhedron/demo/Polyhedron/include/run_with_qprogressdialog.h @@ -20,9 +20,9 @@ private: mutable std::size_t nb; public: - boost::shared_ptr latest_adv; - boost::shared_ptr state; - boost::shared_ptr signaler; + std::shared_ptr latest_adv; + std::shared_ptr state; + std::shared_ptr signaler; Signal_callback(bool) : latest_adv (new double(0)) @@ -71,7 +71,7 @@ public: class Functor_with_signal_callback { protected: - boost::shared_ptr m_callback; + std::shared_ptr m_callback; public: Signal_callback* callback() { return m_callback.get(); } diff --git a/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_point_access.cpp b/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_point_access.cpp index f4e5a859bca..34abf4d8049 100644 --- a/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_point_access.cpp +++ b/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_point_access.cpp @@ -99,7 +99,7 @@ int main(int argc, char** argv) { Efficient_ransac::Shape_range::iterator it = shapes.begin(); while (it != shapes.end()) { - boost::shared_ptr shape = *it; + std::shared_ptr shape = *it; // Use Shape_base::info() to print the parameters of the detected shape. std::cout << (*it)->info(); diff --git a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h index 53331b8d709..3612ac02c70 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h +++ b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h @@ -37,7 +37,7 @@ // boost -------------- #include -#include +#include #include //--------------------- @@ -104,36 +104,36 @@ public: #ifdef DOXYGEN_RUNNING typedef unspecified_type Shape_range; - ///< `Iterator_range` with a bidirectional constant iterator type with value type `boost::shared_ptr`. + ///< `Iterator_range` with a bidirectional constant iterator type with value type `std::shared_ptr`. typedef unspecified_type Plane_range; - ///< `Iterator_range` with a bidirectional constant iterator type with value type `boost::shared_ptr`. + ///< `Iterator_range` with a bidirectional constant iterator type with value type `std::shared_ptr`. #else struct Shape_range : public Iterator_range< - typename std::vector >::const_iterator> { + typename std::vector >::const_iterator> { typedef Iterator_range< - typename std::vector >::const_iterator> Base; + typename std::vector >::const_iterator> Base; - Shape_range(boost::shared_ptr > > + Shape_range(std::shared_ptr > > extracted_shapes) : Base(make_range(extracted_shapes->begin(), extracted_shapes->end())), m_extracted_shapes(extracted_shapes) {} private: - boost::shared_ptr > > + std::shared_ptr > > m_extracted_shapes; // keeps a reference to the shape vector }; struct Plane_range : public Iterator_range< - typename std::vector >::const_iterator> { + typename std::vector >::const_iterator> { typedef Iterator_range< - typename std::vector >::const_iterator> Base; + typename std::vector >::const_iterator> Base; - Plane_range(boost::shared_ptr > > + Plane_range(std::shared_ptr > > extracted_shapes) : Base(make_range(extracted_shapes->begin(), extracted_shapes->end())), m_extracted_shapes(extracted_shapes) {} private: - boost::shared_ptr > > + std::shared_ptr > > m_extracted_shapes; // keeps a reference to the shape vector }; @@ -291,7 +291,7 @@ public: clear(); m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points = std::distance( m_input_iterator_first, m_input_iterator_beyond); @@ -435,7 +435,7 @@ public: std::vector().swap(m_shape_index); m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points; @@ -488,7 +488,7 @@ public: // Reset data structures possibly used by former search m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points; for (std::size_t i = 0; i < m_num_subsets; i++) { @@ -755,7 +755,7 @@ public: //1. add best candidate to final result. m_extracted_shapes->push_back( - boost::shared_ptr(best_candidate)); + std::shared_ptr(best_candidate)); if (callback && !callback(num_invalid / double(m_num_total_points))) { clear(num_invalid, candidates); @@ -874,7 +874,7 @@ public: /// @{ /*! Returns an `Iterator_range` with a bidirectional iterator with value type - `boost::shared_ptr` over the detected shapes in the order of detection. + `std::shared_ptr` over the detected shapes in the order of detection. Depending on the chosen probability for the detection, the shapes are ordered with decreasing size. */ @@ -884,21 +884,21 @@ public: /*! Returns an `Iterator_range` with a bidirectional iterator with - value type `boost::shared_ptr` over only the + value type `std::shared_ptr` over only the detected planes in the order of detection. Depending on the chosen probability for the detection, the planes are ordered with decreasing size. */ Plane_range planes() const { - boost::shared_ptr > > planes - = boost::make_shared > >(); + std::shared_ptr > > planes + = std::make_shared > >(); for (std::size_t i = 0; i < m_extracted_shapes->size(); ++i) { - boost::shared_ptr pshape + std::shared_ptr pshape = boost::dynamic_pointer_cast((*m_extracted_shapes)[i]); // Ignore all shapes other than plane - if (pshape != boost::shared_ptr()) + if (pshape != std::shared_ptr()) planes->push_back(pshape); } return Plane_range(planes); @@ -1218,7 +1218,7 @@ private: //give the index of the subset of point i std::vector m_index_subsets; - boost::shared_ptr > > m_extracted_shapes; + std::shared_ptr > > m_extracted_shapes; std::vector m_shape_factories; diff --git a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h index 3fb4ecea249..774a21437cc 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h +++ b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h @@ -31,7 +31,7 @@ namespace Shape_detection { class Point_to_shape_index_map { typedef CGAL::Shape_detection::Shape_base Shape; - boost::shared_ptr > m_indices; + std::shared_ptr > m_indices; public: typedef std::size_t key_type; ///< %Index of the point in the random access point range. @@ -50,7 +50,7 @@ namespace Shape_detection { \tparam ShapeRange must be an `Iterator_range` with a bidirectional constant iterator type with value type - `boost::shared_ptr >`. + `std::shared_ptr >`. */ template Point_to_shape_index_map (const PointRange& points, @@ -85,7 +85,7 @@ namespace Shape_detection { { public: typedef CGAL::Shape_detection::Plane Plane_shape; - typedef boost::shared_ptr key_type; + typedef std::shared_ptr key_type; typedef typename Traits::Plane_3 value_type; typedef value_type reference; typedef boost::read_write_property_map_tag category; diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cone_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cone_parameters.cpp index 39ac55d03fc..e907bbbfe0b 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cone_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cone_parameters.cpp @@ -74,7 +74,7 @@ bool test_cone_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr cone = boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr cone = boost::dynamic_pointer_cast((*shapes.first)); // Check: shape detected is a cone. if (!cone) diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cylinder_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cylinder_parameters.cpp index 67cbbf24958..4d05c98d068 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cylinder_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_cylinder_parameters.cpp @@ -73,7 +73,7 @@ bool test_cylinder_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr cyl = boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr cyl = boost::dynamic_pointer_cast((*shapes.first)); // Check: shape detected is a cylinder. if (!cyl) diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_plane_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_plane_parameters.cpp index b963ed1e636..e47a2f47216 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_plane_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_plane_parameters.cpp @@ -67,7 +67,7 @@ bool test_plane_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr pl = boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr pl = boost::dynamic_pointer_cast((*shapes.first)); if (!pl) continue; diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_scene.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_scene.cpp index fbe007b13c7..e78e2e3ca5a 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_scene.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_scene.cpp @@ -75,7 +75,7 @@ bool test_scene(int argc, char** argv) { // Iterate through all shapes and access each point. while (it != shapes.end()) { - boost::shared_ptr shape = *it; + std::shared_ptr shape = *it; // Sum distances of points to detected shapes. FT sum_distances = 0; diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_sphere_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_sphere_parameters.cpp index 0dbc63bb9de..c6dcb0e0999 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_sphere_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_sphere_parameters.cpp @@ -70,7 +70,7 @@ bool test_sphere_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr sphere = boost::dynamic_pointer_cast((*shapes.first)); + std::shared_ptr sphere = boost::dynamic_pointer_cast((*shapes.first)); // Check: shape detected is a cylinder. if (!sphere) diff --git a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_torus_parameters.cpp b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_torus_parameters.cpp index 42138f178ff..c380d26c7f9 100644 --- a/Shape_detection/test/Shape_detection/test_efficient_RANSAC_torus_parameters.cpp +++ b/Shape_detection/test/Shape_detection/test_efficient_RANSAC_torus_parameters.cpp @@ -72,7 +72,7 @@ bool test_torus_parameters() { if (shapes.size() != 1) continue; - boost::shared_ptr torus = + std::shared_ptr torus = boost::dynamic_pointer_cast((*shapes.first)); // Check: shape detected is a torus. diff --git a/Straight_skeleton_2/benchmark/Straight_skeleton_2/compare_kernels_simple_polygon_skeleton.cpp b/Straight_skeleton_2/benchmark/Straight_skeleton_2/compare_kernels_simple_polygon_skeleton.cpp index c75bc824e4b..45b78c18a09 100644 --- a/Straight_skeleton_2/benchmark/Straight_skeleton_2/compare_kernels_simple_polygon_skeleton.cpp +++ b/Straight_skeleton_2/benchmark/Straight_skeleton_2/compare_kernels_simple_polygon_skeleton.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include @@ -97,7 +97,7 @@ void build_skeleton(const char* fname) time.start(); SsBuilder ssb; ssb.enter_contour(pgn.vertices_begin(), pgn.vertices_end()); - boost::shared_ptr straight_ske = ssb.construct_skeleton(); + std::shared_ptr straight_ske = ssb.construct_skeleton(); time.stop(); std::cout << "Time spent to build skeleton " << time.time() << "\n"; diff --git a/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton.cpp b/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton.cpp index c20f3601883..206d7fdaeca 100644 --- a/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton.cpp +++ b/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton.cpp @@ -1,7 +1,5 @@ #include -#include - #include #include #include @@ -13,8 +11,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton_tweaking_skeleton.cpp b/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton_tweaking_skeleton.cpp index 0f8da09cbfc..438017f36f6 100644 --- a/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton_tweaking_skeleton.cpp +++ b/Straight_skeleton_2/benchmark/Straight_skeleton_2/create_exterior_skeleton_tweaking_skeleton.cpp @@ -1,7 +1,5 @@ #include -#include - #include #include #include @@ -13,8 +11,8 @@ typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; typedef Ss::Halfedge_const_iterator Halfedge_const_iterator ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Polygon_offset_builder_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Polygon_offset_builder_2.h index 3f4db57e881..65cbf5cbb71 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Polygon_offset_builder_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Polygon_offset_builder_2.h @@ -91,12 +91,12 @@ or external angle approaches `0`, numerical overflow may prevent some of the pol If that happens, the failed contour just won't be added into the resulting sequence. \tparam OutputIterator must be a model of the OutputIterator category whose `value_type` - is a `boost::shared_ptr` holding the dynamically allocated instances of type `Container`. + is a `std::shared_ptr` holding the dynamically allocated instances of type `Container`. \param t the offset value \param out an output iterator. For each resulting offset contour, a default constructed instance of `Container` type, is dynamically allocated and each offset vertex is added to it. - A `boost::shared_ptr` holding onto the dynamically allocated container is inserted + A `std::shared_ptr` holding onto the dynamically allocated container is inserted into the output sequence via the OutputIterator `out`. \returns an `OutputIterator` past-the-end of the resulting sequence, which contains each offset contour generated. diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_builder_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_builder_2.h index 0f832497438..1c0c422aa36 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_builder_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_builder_2.h @@ -195,7 +195,7 @@ must be entered before calling `construct_skeleton()`. After `construct_skeleton()` completes, you cannot enter more contours and/or call `construct_skeleton()` again. If you need another straight skeleton for another polygon you must instantiate and use another builder. -The result is a dynamically allocated instance of the `Ss` class, wrapped in a `boost::shared_ptr`. +The result is a dynamically allocated instance of the `Ss` class, wrapped in a `std::shared_ptr`. If the construction process fails for whatever reason (such as a nearly-degenerate vertex whose internal or external angle is almost zero), the return value will be null, represented @@ -204,7 +204,7 @@ by a default constructed `shared_ptr`. The algorithm automatically checks the consistency of the result, thus, if it is not nullptr, it is guaranteed to be valid. */ -boost::shared_ptr construct_skeleton(); +std::shared_ptr construct_skeleton(); /// @} diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_converter_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_converter_2.h index d3ff08ad9f4..a5ea28252e2 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Straight_skeleton_converter_2.h @@ -14,7 +14,7 @@ using the items converter `ic` to convert the geometric embedding to the types o \sa `CGAL::Straight_skeleton_converter_2` */ template -boost::shared_ptr +std::shared_ptr convert_straight_skeleton_2( Source_skeleton const& s, Items_converted const& ic = Items_converter() ); @@ -77,7 +77,7 @@ Straight_skeleton_converter_2( const Items_converter& c = Items_converter() ); /*! returns a new straight skeleton data structure with the same combinatorial and geometric data as `s` using the items converter to convert the geometric embeeding to the types of the target traits. */ -boost::shared_ptr operator()( const Source_skeleton& s) const; +std::shared_ptr operator()( const Source_skeleton& s) const; /// @} diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/arrange_offset_polygons_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/arrange_offset_polygons_2.h index 49c4814f04f..9b558743b36 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/arrange_offset_polygons_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/arrange_offset_polygons_2.h @@ -8,16 +8,16 @@ by `create_offset_polygons_2()` into 2D polygons with holes by determining geome relationships using a simple algorithm based on the particular characteristics of offset polygons. The function determines parent-hole relationships among the polygons given by `[begin,end]` creating -`boost::shared_ptr< GeneralPolygonWithHoles_2 >` objects added to the output sequence given `out`. +`std::shared_ptr< GeneralPolygonWithHoles_2 >` objects added to the output sequence given `out`. A `CLOCKWISE` oriented polygon `H` is a hole of a `COUNTERCLOCKWISE` polygon `P`, iff at least one vertex of `H` is `ON_BOUNDED_SIDE` of `P`. This function should not be used to arrange arbitrary polygons into polygons with holes unless they meet the requirements specified below. \tparam K must be a model of `Kernel`. \tparam InputPolygonPtrIterator must be a model of `InputIterator` whose `value_type` is a smart pointer -(such as `boost::shared_ptr`) whose `element_type` is a model of `SequenceContainer` with value type `K::Point_2`. +(such as `std::shared_ptr`) whose `element_type` is a model of `SequenceContainer` with value type `K::Point_2`. \tparam OutputPolygonWithHolesPtrIterator must be a model of `OutputIterator` whose `value_type` is a smart pointer -(such as `boost::shared_ptr`) whose `element_type` is a model of `GeneralPolygonWithHoles_2`. +(such as `std::shared_ptr`) whose `element_type` is a model of `GeneralPolygonWithHoles_2`. \pre The input polygons must be simple. \pre The set of input polygons are unique and interior disjoint. That is, given distinct polygons diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_2.h index 831b3967b62..1d4b660c8a1 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_2.h @@ -25,7 +25,7 @@ of a polygon with holes, the offset polygons will be generated in its exterior. \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_offset_polygons_2 ( FT offset, const StraightSkeleton& s, OfK k = Exact_predicates_inexact_constructions_kernel ) ; @@ -63,7 +63,7 @@ polygons to be constructed. \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_exterior_skeleton_and_offset_polygons_2( FT offset, const InKPolygon& poly, OfK ofk = Exact_predicates_inexact_constructions_kernel, @@ -100,7 +100,7 @@ and `create_offset_polygons_2()` instead. \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_interior_skeleton_and_offset_polygons_2 ( FT offset, const InKPolygon& outer_boundary, HoleIterator holes_begin, @@ -135,7 +135,7 @@ and `create_offset_polygons_2()` instead. \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_interior_skeleton_and_offset_polygons_2 ( FT offset, const InKPolygon& poly, OfK ofk = CGAL::Exact_predicates_inexact_constructions_kernel, diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_from_polygon_with_holes_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_from_polygon_with_holes_2.h index b2eea3ecf4b..ea2025cb49e 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_offset_polygons_from_polygon_with_holes_2.h @@ -25,7 +25,7 @@ This is equivalent to `arrange_offset_polygons_2(create_interior_skeleton_and_of \sa `Polygon_offset_builder_2` */ template -std::vector< boost::shared_ptr< OfKPolygon > > +std::vector< std::shared_ptr< OfKPolygon > > create_interior_skeleton_and_offset_polygons_with_holes_2(FT offset, const InKPolygon& poly_with_holes, OfK ofk = CGAL::Exact_predicates_inexact_constructions_kernel, @@ -63,7 +63,7 @@ having reversed the orientation of all other polygons. \sa `Polygon_offset_builder_2` */ template -std::vector > +std::vector > create_exterior_skeleton_and_offset_polygons_with_holes_2(FT offset, const InKPolygon& poly_with_holes, OfK ofk = Exact_predicates_inexact_constructions_kernel, diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_straight_skeleton_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_straight_skeleton_2.h index 3840424cd21..7d175b73f98 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_straight_skeleton_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/create_straight_skeleton_2.h @@ -26,7 +26,7 @@ from this exterior skeleton, as computed by the function `compute_outer_frame_ma \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_straight_skeleton_2( FT max_offset, PointIterator vertices_begin, PointIterator vertices_end, @@ -56,7 +56,7 @@ from this exterior skeleton, as computed by the function `compute_outer_frame_ma \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_straight_skeleton_2 ( FT max_offset, const Polygon& P, SsK k = CGAL::Exact_predicates_inexact_constructions_kernel ) ; @@ -82,7 +82,7 @@ holes given by `[holes_begin,holes_end]`. \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2 ( PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, HoleIterator holes_begin, @@ -105,7 +105,7 @@ polygon whose outer boundary is given by the point sequence \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2 ( PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, SsK k = CGAL::Exact_predicates_inexact_constructions_kernel ) ; @@ -127,7 +127,7 @@ polygon `outer_contour`. \sa `CGAL::Straight_skeleton_builder_2` */ template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2 ( const Polygon& outer_contour, SsK k = CGAL::Exact_predicates_inexact_constructions_kernel ) ; diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/Straight_skeleton_2.txt b/Straight_skeleton_2/doc/Straight_skeleton_2/Straight_skeleton_2.txt index 30063a178b5..0c05bf7e5e2 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/Straight_skeleton_2.txt +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/Straight_skeleton_2.txt @@ -368,11 +368,11 @@ To construct a set of inward offset contours the user must: (3) Call `Polygon_offset_builder_2::construct_offset_contours()` passing the desired offset distance and an output iterator that can store a -`boost::shared_ptr` of `Container` instances +`std::shared_ptr` of `Container` instances into a resulting sequence (typically, a back insertion iterator) Each element in the resulting sequence is an offset contour, given by -a `boost::shared_ptr` holding a dynamically allocated instance +a `std::shared_ptr` holding a dynamically allocated instance of the Container type. Such a container can be any model of the `SequenceContainer` concept, for example, a `CGAL::Polygon_2`, or just a `std::vector` of 2D points. diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp index fed81126621..f89d23f0018 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_offset_polygons_2.cpp @@ -4,7 +4,7 @@ #include #include "print.h" -#include +#include #include #include @@ -15,8 +15,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp index 95eca620ae7..ba3e555ec09 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp @@ -4,7 +4,7 @@ #include #include "print.h" -#include +#include #include #include @@ -16,8 +16,8 @@ typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp index d0b1a979669..572814f6682 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp @@ -4,7 +4,7 @@ #include #include "print.h" -#include +#include #include #include @@ -16,8 +16,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp index bf91a2de00d..2bdd31e75f7 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp @@ -4,7 +4,7 @@ #include #include "print.h" -#include +#include #include #include @@ -15,7 +15,7 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 PolygonWithHoles ; -typedef boost::shared_ptr PolygonWithHolesPtr ; +typedef std::shared_ptr PolygonWithHolesPtr ; typedef std::vector PolygonWithHolesPtrVector; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp index ce2e11e57f9..08e57f794af 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_2.cpp @@ -4,8 +4,6 @@ #include #include "print.h" -#include - #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K ; @@ -14,7 +12,7 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; int main() { diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp index 3dfe3b48437..98dc57fac28 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp @@ -4,7 +4,7 @@ #include #include "print.h" -#include +#include #include @@ -15,7 +15,7 @@ typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; int main() { diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp index 798228788ba..52e405a4dd3 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp @@ -7,7 +7,7 @@ #include #include "print.h" -#include +#include #include #include @@ -22,7 +22,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_2 Point_2; typedef CGAL::Polygon_2 Contour; -typedef boost::shared_ptr ContourPtr; +typedef std::shared_ptr ContourPtr; typedef std::vector ContourSequence ; typedef CGAL::Straight_skeleton_2 Ss; @@ -97,7 +97,7 @@ int main() ssb.enter_contour(star.rbegin(),star.rend()); // Construct the skeleton - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); // Proceed only if the skeleton was correctly constructed. if ( ss ) diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Show_offset_polygon.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Show_offset_polygon.cpp index 296d721cc40..8a35567dafd 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Show_offset_polygon.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Show_offset_polygon.cpp @@ -4,7 +4,7 @@ #include #include "dump_to_eps.h" -#include +#include #include #include @@ -16,7 +16,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K ; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes ; -typedef boost::shared_ptr Polygon_with_holes_ptr ; +typedef std::shared_ptr Polygon_with_holes_ptr ; typedef std::vector Polygon_with_holes_ptr_vector ; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Show_straight_skeleton.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Show_straight_skeleton.cpp index 080749ec962..1273b49f785 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Show_straight_skeleton.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Show_straight_skeleton.cpp @@ -6,8 +6,6 @@ #include #include -#include - #include #include #include @@ -21,7 +19,7 @@ typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes ; typedef CGAL::Straight_skeleton_2 Straight_skeleton ; -typedef boost::shared_ptr Straight_skeleton_ptr ; +typedef std::shared_ptr Straight_skeleton_ptr ; int main( int argc, char* argv[] ) { diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/draw_straight_skeleton_2.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/draw_straight_skeleton_2.cpp index c86c3f4593e..96f3da42c1d 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/draw_straight_skeleton_2.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/draw_straight_skeleton_2.cpp @@ -4,8 +4,6 @@ #include #include -#include - #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K ; @@ -14,7 +12,7 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr SsPtr ; int main() { diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/dump_to_eps.h b/Straight_skeleton_2/examples/Straight_skeleton_2/dump_to_eps.h index 5e94bf72b3d..efc8694a921 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/dump_to_eps.h +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/dump_to_eps.h @@ -84,11 +84,11 @@ void dump_to_eps( CGAL::Straight_skeleton_2 const& aSkeleton, char const* aTy template void dump_to_eps ( CGAL::Polygon_with_holes_2 const& aInput - , std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > const& aOutput + , std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > const& aOutput , std::ostream& rOut ) { - typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > PolyWH_vector ; + typedef std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > PolyWH_vector ; CGAL::Bbox_2 lBbox = CGAL::bbox_2(aInput); diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/exterior_offset_of_multiple_polygons_with_holes.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/exterior_offset_of_multiple_polygons_with_holes.cpp index f6e0a86a931..d2da4691924 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/exterior_offset_of_multiple_polygons_with_holes.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/exterior_offset_of_multiple_polygons_with_holes.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include @@ -17,8 +17,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Polygon_with_holes_2 PolygonWithHoles ; -typedef boost::shared_ptr PolygonWithHolesPtr ; -typedef boost::shared_ptr PolygonPtr ; +typedef std::shared_ptr PolygonWithHolesPtr ; +typedef std::shared_ptr PolygonPtr ; typedef std::vector PolygonWithHolesPtrVector; typedef std::vector PolygonPtrVector; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/print.h b/Straight_skeleton_2/examples/Straight_skeleton_2/print.h index 4afc5e4a3bd..216e11f0dd6 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/print.h +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/print.h @@ -21,9 +21,9 @@ void print_polygon ( CGAL::Polygon_2 const& poly ) } template -void print_polygons ( std::vector< boost::shared_ptr< CGAL::Polygon_2 > > const& polies ) +void print_polygons ( std::vector< std::shared_ptr< CGAL::Polygon_2 > > const& polies ) { - typedef std::vector< boost::shared_ptr< CGAL::Polygon_2 > > PolygonVector ; + typedef std::vector< std::shared_ptr< CGAL::Polygon_2 > > PolygonVector ; std::cout << "Polygon list with " << polies.size() << " polygons" << std::endl ; @@ -45,10 +45,10 @@ void print_polygon_with_holes ( CGAL::Polygon_with_holes_2 const& polywh ) } template -void print_polygons_with_holes ( std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > const& polies ) +void print_polygons_with_holes ( std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > const& polies ) { - typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > PolygonWithHolesVector ; + typedef std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > PolygonWithHolesVector ; std::cout << "Polygon_with_holes list with " << polies.size() << " element" << std::endl ; diff --git a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h index 9d498c8f7ea..3ddac56aa28 100644 --- a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h +++ b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h @@ -17,7 +17,7 @@ #include #include -#include +#include #include @@ -71,7 +71,7 @@ public : typedef boost::optional OptionalPoint_2 ; - typedef boost::shared_ptr ContainerPtr ; + typedef std::shared_ptr ContainerPtr ; Polygon_offset_builder_2( Ss const& aSs, Traits const& aTraits = Traits(), Visitor const& aVisitor = Visitor() ) ; diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h index 4740194987b..04aa6864b4c 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h @@ -15,7 +15,7 @@ #include -#include +#include namespace CGAL { namespace CGAL_SS_i { @@ -33,11 +33,11 @@ inline typename Poly::const_iterator vertices_end ( Poly const& aPoly ) { return aPoly.end() ; } template -inline typename Poly::const_iterator vertices_begin ( boost::shared_ptr const& aPoly ) +inline typename Poly::const_iterator vertices_begin ( std::shared_ptr const& aPoly ) { return aPoly->begin() ; } template -inline typename Poly::const_iterator vertices_end ( boost::shared_ptr const& aPoly ) +inline typename Poly::const_iterator vertices_end ( std::shared_ptr const& aPoly ) { return aPoly->end() ; } // Polygon_2 @@ -52,11 +52,11 @@ vertices_end( Polygon_2 const& aPoly ) { return aPoly.vertices_end() ; } template -inline typename Polygon_2::Vertex_const_iterator vertices_begin ( boost::shared_ptr > const& aPoly ) +inline typename Polygon_2::Vertex_const_iterator vertices_begin ( std::shared_ptr > const& aPoly ) { return aPoly->vertices_begin() ; } template -inline typename Polygon_2::Vertex_const_iterator vertices_end( boost::shared_ptr > const& aPoly ) +inline typename Polygon_2::Vertex_const_iterator vertices_end( std::shared_ptr > const& aPoly ) { return aPoly->vertices_end() ; } // Polygon_with_holes_2 @@ -72,12 +72,12 @@ vertices_end( Polygon_with_holes_2 const& aPoly ) template inline typename Polygon_with_holes_2::Polygon_2::Vertex_const_iterator -vertices_begin ( boost::shared_ptr > const& aPoly ) +vertices_begin ( std::shared_ptr > const& aPoly ) { return aPoly->outer_boundary().vertices_begin() ; } template inline typename Polygon_with_holes_2::Polygon_2::Vertex_const_iterator -vertices_end( boost::shared_ptr > const& aPoly ) +vertices_end( std::shared_ptr > const& aPoly ) { return aPoly->outer_boundary().vertices_end() ; } } // namespace CGAL_SS_i diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h index c0fea4462de..c7e3f77fbd7 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -111,7 +111,7 @@ public: typedef SSkel_ SSkel ; typedef Visitor_ Visitor ; - typedef boost::shared_ptr SSkelPtr ; + typedef std::shared_ptr SSkelPtr ; private : diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h index 650b1894a2a..0665d6de374 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include @@ -163,7 +163,7 @@ struct Straight_skeleton_converter_2 typedef typename Source_skeleton::Traits Source_traits ; typedef typename Target_skeleton::Traits Target_traits ; - typedef boost::shared_ptr Target_skeleton_ptr ; + typedef std::shared_ptr Target_skeleton_ptr ; typedef typename Source_skeleton::Vertex_const_iterator Source_vertex_const_iterator ; typedef typename Source_skeleton::Halfedge_const_iterator Source_halfedge_const_iterator ; @@ -333,7 +333,7 @@ private : } ; template -boost::shared_ptr +std::shared_ptr convert_straight_skeleton_2 ( Source_skeleton const& aSrc, Items_converter const& ic ) { typedef Straight_skeleton_converter_2 Skeleton_converter ; @@ -345,7 +345,7 @@ convert_straight_skeleton_2 ( Source_skeleton const& aSrc, Items_converter const } template -boost::shared_ptr +std::shared_ptr convert_straight_skeleton_2 ( Source_skeleton const& aSrc ) { typedef Straight_skeleton_items_converter_2 Items_converter ; diff --git a/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h b/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h index 4ceae69e570..840e0950b84 100644 --- a/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h +++ b/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -53,7 +53,7 @@ bool arrange_offset_polygons_2 ( InputPolygonPtrIterator aBegin typedef typename std::iterator_traits::difference_type difference_type ; typedef typename std::iterator_traits::value_type PolygonPtr ; - typedef boost::shared_ptr PolygonWithHolesPtr ; + typedef std::shared_ptr PolygonWithHolesPtr ; difference_type lSize = std::distance(aBegin,aEnd); @@ -113,18 +113,18 @@ bool arrange_offset_polygons_2 ( InputPolygonPtrIterator aBegin } template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline -arrange_offset_polygons_2 ( std::vector > const& aPolygons, +arrange_offset_polygons_2 ( std::vector > const& aPolygons, bool& no_error) { - typedef std::vector< boost::shared_ptr > result_type ; + typedef std::vector< std::shared_ptr > result_type ; typedef std::back_insert_iterator Back_inserter; typedef typename PolygonWithHoles::General_polygon_2 Polygon_2 ; typedef typename Kernel_traits::type>::Kernel K ; - typedef typename std::vector >::const_iterator PolygonIterator ; + typedef typename std::vector >::const_iterator PolygonIterator ; result_type rResult ; no_error = arrange_offset_polygons_2( @@ -134,9 +134,9 @@ arrange_offset_polygons_2 ( std::vector > const& aPol } template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline -arrange_offset_polygons_2 ( std::vector > const& aPolygons) +arrange_offset_polygons_2 ( std::vector > const& aPolygons) { bool no_error; return arrange_offset_polygons_2(aPolygons, no_error); diff --git a/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h b/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h index dbaa31bbcb8..9a8a97012cb 100644 --- a/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h +++ b/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include @@ -103,7 +103,7 @@ struct Default_return_polygon_with_holes_type // Polygon ty }; template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_partial_interior_straight_skeleton_2 ( FT const& aMaxTime , PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -139,7 +139,7 @@ create_partial_interior_straight_skeleton_2 ( FT const& aMaxTime } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin , PointIterator aVerticesEnd @@ -152,7 +152,7 @@ create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset typedef typename Kernel_traits::Kernel IK; typedef typename IK::FT IFT; - boost::shared_ptr > rSkeleton; + std::shared_ptr > rSkeleton; // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) @@ -199,10 +199,10 @@ create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset // Kernel != Skeleton::kernel. The skeleton is converted to Straight_skeleton_2 // template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Tag_false ) { - typedef boost::shared_ptr OutPolygonPtr ; + typedef std::shared_ptr OutPolygonPtr ; typedef std::vector OutPolygonPtrVector ; typedef Straight_skeleton_2 OfSkeleton ; @@ -212,7 +212,7 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Ta OutPolygonPtrVector rR ; - boost::shared_ptr lConvertedSs = convert_straight_skeleton_2(aSs); + std::shared_ptr lConvertedSs = convert_straight_skeleton_2(aSs); OffsetBuilder ob( *lConvertedSs ); ob.construct_offset_contours(aOffset, std::back_inserter(rR) ) ; @@ -223,10 +223,10 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Ta // Kernel == Skeleton::kernel, no conversion // template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k*/, Tag_true ) { - typedef boost::shared_ptr OutPolygonPtr ; + typedef std::shared_ptr OutPolygonPtr ; typedef std::vector OutPolygonPtrVector ; typedef Polygon_offset_builder_traits_2 OffsetBuilderTraits; @@ -242,7 +242,7 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k* // Allow failure due to invalid straight skeletons to go through the users template -Skeleton const& dereference ( boost::shared_ptr const& ss ) +Skeleton const& dereference ( std::shared_ptr const& ss ) { CGAL_precondition(ss.get() != 0); return *ss; @@ -251,7 +251,7 @@ Skeleton const& dereference ( boost::shared_ptr const& ss ) } // namespace CGAL_SS_i template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_offset_polygons_2(const FT& aOffset, const Skeleton& aSs, @@ -263,7 +263,7 @@ create_offset_polygons_2(const FT& aOffset, template, class FT, class Skeleton> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_offset_polygons_2(const FT& aOffset, const Skeleton& aSs) @@ -278,7 +278,7 @@ create_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aOuterBoundary, @@ -302,7 +302,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aOuterBoundary, @@ -319,7 +319,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overload where Polygon actually is a simple polygon (no holes) template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -337,7 +337,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overloads common to both polygons with and without holes, a simple polygon is returned in any case template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -350,7 +350,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly) @@ -369,7 +369,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overload where Polygon actually is a simple polygon (no holes) template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -392,7 +392,7 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overloads common to both polygons with and without holes, a simple polygons are returned in any case template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -405,7 +405,7 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly) diff --git a/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h b/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h index 745ce692b68..1edf67e1129 100644 --- a/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -38,7 +38,7 @@ namespace CGAL { // overload where PolygonWithHoles actually is a type of Polygon that supports holes template::type> // Hole-less polygon type -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const PolygonWithHoles& aPoly, @@ -57,7 +57,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Polygon might be a Polygon with holes or not, but it returns a Polygon with holes template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -70,7 +70,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -83,7 +83,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly) @@ -102,7 +102,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, // Polygon might be a Polygon with holes or not, but it returns a Polygon with holes template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -110,7 +110,7 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const SsK& ssk) { typedef typename CGAL_SS_i::Default_return_polygon_type::type Polygon_; - std::vector > raw_output = + std::vector > raw_output = create_exterior_skeleton_and_offset_polygons_2(aOffset, aPoly, ofk, ssk); // filter offset of the outer frame @@ -129,7 +129,7 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, if (outer_id != (raw_output.size()-1)) std::swap(raw_output[outer_id], raw_output.back()); raw_output.pop_back(); - for (boost::shared_ptr ptr : raw_output) + for (std::shared_ptr ptr : raw_output) ptr->reverse_orientation(); return arrange_offset_polygons_2(raw_output); @@ -140,7 +140,7 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, // overload where PolygonWithHoles actually is a type of Polygon that supports holes template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const PolygonWithHoles& aPoly, @@ -149,14 +149,14 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, std::enable_if_t< CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) { - std::vector > polygons = + std::vector > polygons = create_exterior_skeleton_and_offset_polygons_2(aOffset, aPoly.outer_boundary(), ofk, ssk); for (typename PolygonWithHoles::Hole_const_iterator hit=aPoly.holes_begin(); hit!=aPoly.holes_end(); ++hit) { typename PolygonWithHoles::Polygon_2 hole = *hit; hole.reverse_orientation(); - std::vector > hole_polygons = + std::vector > hole_polygons = create_interior_skeleton_and_offset_polygons_2(aOffset, hole, ofk,ssk); @@ -168,7 +168,7 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -181,7 +181,7 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly) diff --git a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h index aa73ed322c6..d88fb85ac50 100644 --- a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -31,7 +31,7 @@ namespace CGAL { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd , HoleIterator aHolesBegin @@ -61,7 +61,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > +std::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -78,7 +78,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -98,7 +98,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -111,7 +111,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( Polygon const& aOutContour, K const& k, @@ -125,7 +125,7 @@ create_interior_straight_skeleton_2 ( Polygon const& aOutContour, } template -boost::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > +std::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > inline create_interior_straight_skeleton_2 ( Polygon const& aOutContour ) { @@ -138,7 +138,7 @@ create_interior_straight_skeleton_2 ( Polygon const& aOutContour ) /// EXTERIOR template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin , PointIterator aVerticesEnd @@ -151,7 +151,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset typedef typename Kernel_traits::Kernel IK; typedef typename IK::FT IFT; - boost::shared_ptr > rSkeleton; + std::shared_ptr > rSkeleton; // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) @@ -195,7 +195,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin @@ -210,7 +210,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly, K const& k ) { @@ -222,7 +222,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly ) { diff --git a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h index 34ededf3da7..9693981d4e0 100644 --- a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h @@ -20,14 +20,14 @@ #include -#include +#include #include namespace CGAL { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( Polygon const& aPolyWithHoles, K const& k, diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_offset_builder_types.h b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_offset_builder_types.h index e4470f20366..7f6217477a8 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_offset_builder_types.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_offset_builder_types.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; @@ -29,10 +29,10 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 Point; typedef CGAL::Aff_transformation_2 Transformation; typedef std::vector Polygon_2; -typedef boost::shared_ptr PolygonPtr; +typedef std::shared_ptr PolygonPtr; typedef CGAL::Segment_2 Segment; typedef std::vector Region ; -typedef boost::shared_ptr RegionPtr ; +typedef std::shared_ptr RegionPtr ; typedef std::vector Regions ; typedef std::vector Doubles ; @@ -51,7 +51,7 @@ typedef Sls::Vertex_const_handle Vertex_const_handle ; typedef CGAL::HalfedgeDS_const_decorator Sls_const_decorator ; -typedef boost::shared_ptr SlsPtr ; +typedef std::shared_ptr SlsPtr ; #endif diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_builder_types.h b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_builder_types.h index f41d7f30f81..7a77342eba1 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_builder_types.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_builder_types.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include //typedef CGAL::Simple_cartesian K ; @@ -30,10 +30,10 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 Point; typedef CGAL::Aff_transformation_2 Transformation; typedef std::vector Polygon_2; -typedef boost::shared_ptr PolygonPtr; +typedef std::shared_ptr PolygonPtr; typedef CGAL::Segment_2 Segment; typedef std::vector Region ; -typedef boost::shared_ptr RegionPtr ; +typedef std::shared_ptr RegionPtr ; typedef std::vector Regions ; typedef std::vector Doubles ; @@ -50,7 +50,7 @@ typedef Sls::Vertex_const_handle Vertex_const_handle ; typedef CGAL::HalfedgeDS_const_decorator Sls_const_decorator ; -typedef boost::shared_ptr SlsPtr ; +typedef std::shared_ptr SlsPtr ; #endif diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h index c45acacbdda..cc55c28210a 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -50,16 +50,16 @@ typedef std::vector Doubles ; typedef CGAL::Segment_2 ISegment; typedef std::vector IPolygon; -typedef boost::shared_ptr IPolygonPtr; +typedef std::shared_ptr IPolygonPtr; typedef std::vector IRegion ; -typedef boost::shared_ptr IRegionPtr ; +typedef std::shared_ptr IRegionPtr ; typedef std::vector IRegions ; typedef CGAL::Segment_2 OSegment; typedef std::vector OPolygon; -typedef boost::shared_ptr OPolygonPtr; +typedef std::shared_ptr OPolygonPtr; typedef std::vector ORegion ; -typedef boost::shared_ptr ORegionPtr ; +typedef std::shared_ptr ORegionPtr ; typedef std::vector ORegions ; typedef CGAL::Straight_skeleton_2 ISls; @@ -157,8 +157,8 @@ public: typedef CGAL::HalfedgeDS_const_decorator Sls_const_decorator ; -typedef boost::shared_ptr ISlsPtr ; -typedef boost::shared_ptr OSlsPtr ; +typedef std::shared_ptr ISlsPtr ; +typedef std::shared_ptr OSlsPtr ; typedef CGAL::Straight_skeleton_items_converter_2 SlsItemsConverter ; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/issue4533.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/issue4533.cpp index d552e1241a4..4f59ee87fc2 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/issue4533.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/issue4533.cpp @@ -5,7 +5,7 @@ #include "print.h" #include -#include +#include #include @@ -15,7 +15,7 @@ typedef K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Straight_skeleton_2 Ss; -typedef boost::shared_ptr SsPtr; +typedef std::shared_ptr SsPtr; int main() { diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/issue4684.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/issue4684.cpp index 560d8c01403..47dd764e525 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/issue4684.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/issue4684.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -13,7 +13,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; -typedef boost::shared_ptr PolygonPtr; +typedef std::shared_ptr PolygonPtr; void low_precision_run() { diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp index 9acead190b0..709a1fb0bf7 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp @@ -83,7 +83,7 @@ void test(const PointRange& points, K()); assert(ss_ptr); - std::vector > offset_polygons_ptrs = + std::vector > offset_polygons_ptrs = CGAL::create_offset_polygons_2(FT(offset), CGAL::CGAL_SS_i::dereference(ss_ptr), K()); std::cout << offset_polygons_ptrs.size() << " polygon(s)" << std::endl; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/print.h b/Straight_skeleton_2/test/Straight_skeleton_2/print.h index abaa74d9e46..a3cc881f479 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/print.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/print.h @@ -24,9 +24,9 @@ void print_polygon ( CGAL::Polygon_2 const& poly ) } template -void print_polygons ( std::vector< boost::shared_ptr< CGAL::Polygon_2 > > const& polies ) +void print_polygons ( std::vector< std::shared_ptr< CGAL::Polygon_2 > > const& polies ) { - typedef std::vector< boost::shared_ptr< CGAL::Polygon_2 > > PolygonVector ; + typedef std::vector< std::shared_ptr< CGAL::Polygon_2 > > PolygonVector ; std::cout << "Polygon list with " << polies.size() << " polygons" << std::endl ; @@ -48,10 +48,10 @@ void print_polygon_with_holes ( CGAL::Polygon_with_holes_2 const& polywh ) } template -void print_polygons_with_holes ( std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > const& polies ) +void print_polygons_with_holes ( std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > const& polies ) { - typedef std::vector< boost::shared_ptr< CGAL::Polygon_with_holes_2 > > PolygonWithHolesVector ; + typedef std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > PolygonWithHolesVector ; std::cout << "Polygon_with_holes list with " << polies.size() << " element" << std::endl ; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_offset.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_offset.cpp index 02082ff8724..db7ec3b1622 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_offset.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_offset.cpp @@ -37,7 +37,7 @@ void Straight_skeleton_traits_external_trace(std::string m) #include #include -#include +#include #include #include @@ -60,10 +60,10 @@ void test_API() Polygon_2 p; Polygon_with_holes_2 pwh; - std::vector< boost::shared_ptr > res; - std::vector< boost::shared_ptr > res_EPICK; - std::vector< boost::shared_ptr > res_w; - std::vector< boost::shared_ptr > res_w_EPICK; + std::vector< std::shared_ptr > res; + std::vector< std::shared_ptr > res_EPICK; + std::vector< std::shared_ptr > res_w; + std::vector< std::shared_ptr > res_w_EPICK; // First kernel is the offset construction (and thus output kernel), second kernel is the skeleton construction @@ -135,7 +135,7 @@ void test_API() } template -bool is_valid(const boost::shared_ptr& ss) +bool is_valid(const std::shared_ptr& ss) { typedef typename StraightSkeleton::Traits::Point_2 Point; @@ -176,7 +176,7 @@ void test_offset_square() typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; - typedef boost::shared_ptr Polygon_ptr; + typedef std::shared_ptr Polygon_ptr; typedef std::vector Polygon_ptr_container; typedef CGAL::Straight_skeleton_2 Ss; @@ -193,7 +193,7 @@ void test_offset_square() Skeleton_builder ssb; ssb.enter_contour(square.begin(), square.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); Polygon_ptr_container offset_polys = @@ -216,7 +216,7 @@ void test_offset_four_square_holes() typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; Polygon_2 outer, hole1, hole2, hole3, hole4; @@ -275,7 +275,7 @@ void test_offset_L() typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; - typedef boost::shared_ptr Polygon_ptr; + typedef std::shared_ptr Polygon_ptr; typedef std::vector Polygon_ptr_container; typedef CGAL::Straight_skeleton_2 Ss; @@ -296,7 +296,7 @@ void test_offset_L() Skeleton_builder ssb; ssb.enter_contour(L.begin(), L.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); Polygon_ptr_container offset_polys = @@ -320,7 +320,7 @@ void test_offset_polygon_with_hole() typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; // Square with a non-centered square hole @@ -409,7 +409,7 @@ void test_offset_pinched() typedef typename K::FT FT; typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; - typedef boost::shared_ptr Polygon_ptr; + typedef std::shared_ptr Polygon_ptr; typedef std::vector Polygon_ptrs; typedef CGAL::Straight_skeleton_2 Ss; @@ -447,7 +447,7 @@ void test_offset_pinched() Skeleton_builder ssb; ssb.enter_contour(input.begin(), input.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); // The two splitting fronts meet in the middle, and at that time, @@ -490,7 +490,7 @@ void test_offset_multiple_CCs() typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef CGAL::Polygon_2 Contour; - typedef boost::shared_ptr ContourPtr; + typedef std::shared_ptr ContourPtr; typedef std::vector Contour_sequence; typedef CGAL::Straight_skeleton_2 Ss; @@ -542,7 +542,7 @@ void test_offset_multiple_CCs() ssb.enter_contour(frame, frame+4); ssb.enter_contour(input.rbegin(), input.rend()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); Contour_sequence offset_contours; @@ -564,7 +564,7 @@ void test_offset_non_manifold() typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_ptr; + typedef std::shared_ptr Polygon_with_holes_ptr; typedef std::vector Polygon_with_holes_ptrs; typedef CGAL::Straight_skeleton_2 Ss; @@ -588,7 +588,7 @@ void test_offset_non_manifold() ssb.enter_contour(outer.begin(), outer.end()); ssb.enter_contour(hole.begin(), hole.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); // The two splitting fronts meet in the middle, and at that time, @@ -647,7 +647,7 @@ void test_offset_non_manifold_2() typedef typename K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_ptr; + typedef std::shared_ptr Polygon_with_holes_ptr; typedef std::vector Polygon_with_holes_ptrs; typedef CGAL::Straight_skeleton_2 Ss; @@ -679,7 +679,7 @@ void test_offset_non_manifold_2() ssb.enter_contour(outer.begin(), outer.end()); ssb.enter_contour(hole.begin(), hole.end()); - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); // Similar to the previous function, a split event happens and at that particular time, @@ -733,7 +733,7 @@ void test_offset_polygon_exterior() typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; Polygon_2 poly; @@ -815,7 +815,7 @@ void test_offset_polygon_with_holes_exterior() typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; Polygon_2 outer ; @@ -855,7 +855,7 @@ void test_offset(const char* filename) typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef boost::shared_ptr Polygon_with_holes_2_ptr; + typedef std::shared_ptr Polygon_with_holes_2_ptr; typedef std::vector Polygon_with_holes_2_ptr_container; typedef CGAL::Straight_skeleton_2 Ss; @@ -920,7 +920,7 @@ void test_offset(const char* filename) ssb.enter_contour(polys[i+1].begin(), polys[i+1].end()); } - boost::shared_ptr ss = ssb.construct_skeleton(); + std::shared_ptr ss = ssb.construct_skeleton(); assert(is_valid(ss)); std::set offset_times; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_simple.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_simple.cpp index 4bddf279d39..e134a2746a7 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_simple.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_simple.cpp @@ -34,7 +34,7 @@ void Straight_skeleton_traits_external_trace(std::string m) #include #include -#include +#include #include #include @@ -53,10 +53,10 @@ void test_API() typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; typedef CGAL::Straight_skeleton_2 Straight_skeleton_EPICK; - typedef boost::shared_ptr Straight_skeleton_Ptr_EPICK; + typedef std::shared_ptr Straight_skeleton_Ptr_EPICK; typedef CGAL::Straight_skeleton_2 Straight_skeleton; - typedef boost::shared_ptr Straight_skeleton_Ptr; + typedef std::shared_ptr Straight_skeleton_Ptr; Polygon_2 p; Straight_skeleton_Ptr_EPICK ss0 = CGAL::create_interior_straight_skeleton_2(p); @@ -72,7 +72,7 @@ void test_API() } template -bool is_valid(const boost::shared_ptr& ss) +bool is_valid(const std::shared_ptr& ss) { typedef typename StraightSkeleton::Traits::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; @@ -136,7 +136,7 @@ void test_skeleton(const char* filename, typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; typedef CGAL::Straight_skeleton_2 Straight_skeleton; - typedef boost::shared_ptr Straight_skeleton_Ptr; + typedef std::shared_ptr Straight_skeleton_Ptr; std::ifstream in(filename); assert(in); diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_straight_skeleton_copy.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_straight_skeleton_copy.cpp index acbe7d848b2..b263a98658d 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_straight_skeleton_copy.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_straight_skeleton_copy.cpp @@ -1,7 +1,5 @@ #include -#include - #include #include #include @@ -12,8 +10,8 @@ typedef K::Point_2 Point ; typedef CGAL::Polygon_2 Polygon_2 ; typedef CGAL::Straight_skeleton_2 Ss ; -typedef boost::shared_ptr PolygonPtr ; -typedef boost::shared_ptr SsPtr ; +typedef std::shared_ptr PolygonPtr ; +typedef std::shared_ptr SsPtr ; typedef std::vector PolygonPtrVector ; diff --git a/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h b/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h index e5be891d9b2..e3e26fe8b61 100644 --- a/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h +++ b/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h @@ -16,7 +16,7 @@ #define GEOMETRY_CONTAINER_H #include #include -#include +#include struct Dummy_deleter{ template @@ -45,7 +45,7 @@ struct Geometry_container{ typedef typename Range::const_reverse_iterator const_reverse_iterator; typedef typename Range::size_type size_type; typedef typename Range::value_type value_type; - boost::shared_ptr range; + std::shared_ptr range; bool must_delete; // // Default constructor.