From eff6474fcff34233f5946b1301178505d4b67d13 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sun, 12 Mar 2023 17:53:32 +0200 Subject: [PATCH] Added a parameter pack to the constructor and passed it to the underlying traits; disabled copy constructor. --- .../include/CGAL/Arr_counting_traits_2.h | 13 ++++++------- .../include/CGAL/Arr_tracing_traits_2.h | 6 +++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 7aa1fded18f..4ca915aa7d9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -85,18 +85,17 @@ public: typedef Arr_counting_traits_2 Self; /*! Construct default */ - Arr_counting_traits_2() : Base() + template + Arr_counting_traits_2(Args ... args) : + Base(args...) { clear_counters(); increment(); } - /*! Construct copy */ - Arr_counting_traits_2(const Arr_counting_traits_2& other) : Base(other) - { - clear_counters(); - increment(); - } + /*! Disable copy constructor. + */ + Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; /*! Obtain the counter of the given operation */ size_t count(Operation_id id) const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 042c6cfd0df..15dc5429f10 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -162,7 +162,7 @@ private: { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_OP); } public: - /*! Default constructor */ + /*! Construct default */ template Arr_tracing_traits_2(Args ... args) : Base(args...) @@ -170,6 +170,10 @@ public: enable_all_traces(); } + /*! Disable copy constructor. + */ + Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; + /*! Enable the trace of a traits operation * \param id the operation identifier */