Added a parameter pack to the constructor and passed it to the underlying traits; disabled copy constructor.

This commit is contained in:
Efi Fogel 2023-03-12 17:53:32 +02:00 committed by Laurent Rineau
parent 22d35af320
commit eff6474fcf
2 changed files with 11 additions and 8 deletions

View File

@ -85,18 +85,17 @@ public:
typedef Arr_counting_traits_2<Base> Self; typedef Arr_counting_traits_2<Base> Self;
/*! Construct default */ /*! Construct default */
Arr_counting_traits_2() : Base() template<typename ... Args>
Arr_counting_traits_2(Args ... args) :
Base(args...)
{ {
clear_counters(); clear_counters();
increment(); increment();
} }
/*! Construct copy */ /*! Disable copy constructor.
Arr_counting_traits_2(const Arr_counting_traits_2& other) : Base(other) */
{ Arr_counting_traits_2(const Arr_counting_traits_2&) = delete;
clear_counters();
increment();
}
/*! Obtain the counter of the given operation */ /*! Obtain the counter of the given operation */
size_t count(Operation_id id) const size_t count(Operation_id id) const

View File

@ -162,7 +162,7 @@ private:
{ return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_OP); } { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_OP); }
public: public:
/*! Default constructor */ /*! Construct default */
template<typename ... Args> template<typename ... Args>
Arr_tracing_traits_2(Args ... args) : Arr_tracing_traits_2(Args ... args) :
Base(args...) Base(args...)
@ -170,6 +170,10 @@ public:
enable_all_traces(); enable_all_traces();
} }
/*! Disable copy constructor.
*/
Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete;
/*! Enable the trace of a traits operation /*! Enable the trace of a traits operation
* \param id the operation identifier * \param id the operation identifier
*/ */