From eeb6c4de2317d60a1fd7d7fd74169f31053d45ae Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Thu, 29 Dec 2022 17:10:24 +0300 Subject: [PATCH] Fix -Wdeprecated-copy ``` boost/circular_buffer/include/boost/circular_buffer/details.hpp:263:15: error: definition of implicit copy constructor for 'iterator, boost::cb_details::const_traits>>' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] iterator& operator=(const iterator&) = default; ^ ``` --- include/boost/circular_buffer/details.hpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/include/boost/circular_buffer/details.hpp b/include/boost/circular_buffer/details.hpp index d6d48f3a..fc1499f6 100644 --- a/include/boost/circular_buffer/details.hpp +++ b/include/boost/circular_buffer/details.hpp @@ -258,22 +258,6 @@ struct iterator #endif // #if BOOST_CB_ENABLE_DEBUG - //! Assign operator. -#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) - iterator& operator=(const iterator&) = default; -#else - iterator& operator=(const iterator& it) { - if (this == &it) - return *this; -#if BOOST_CB_ENABLE_DEBUG - debug_iterator_base::operator =(it); -#endif // #if BOOST_CB_ENABLE_DEBUG - m_buff = it.m_buff; - m_it = it.m_it; - return *this; - } -#endif - // Random access iterator methods //! Dereferencing operator.