Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions include/boost/algorithm/string/detail/find_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,26 @@ namespace boost {
// Protected construction/destruction

// Default constructor
find_iterator_base() {}
BOOST_DEFAULTED_FUNCTION(find_iterator_base(), {})

// Copy construction
find_iterator_base( const find_iterator_base& Other ) :
BOOST_DEFAULTED_FUNCTION(find_iterator_base( const find_iterator_base& Other ), :
m_Finder(Other.m_Finder) {}
)

// Assignment
BOOST_DEFAULTED_FUNCTION(find_iterator_base& operator=( const find_iterator_base& Other ), {
m_Finder = Other.m_Finder;
return *this;
})

// Constructor
template<typename FinderT>
find_iterator_base( FinderT Finder, int ) :
m_Finder(Finder) {}

// Destructor
~find_iterator_base() {}
BOOST_DEFAULTED_FUNCTION(~find_iterator_base(), {})

// Find operation
match_type do_find(
Expand Down
28 changes: 27 additions & 1 deletion include/boost/algorithm/string/find_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace boost {

\post eof()==true
*/
find_iterator() {}
BOOST_DEFAULTED_FUNCTION(find_iterator(), {})

//! Copy constructor
/*!
Expand All @@ -85,6 +85,18 @@ namespace boost {
m_Match(Other.m_Match),
m_End(Other.m_End) {}

//! Copy assignment
/*!
Assigns a copy of the find_iterator
*/
BOOST_DEFAULTED_FUNCTION(find_iterator& operator=( const find_iterator& Other ), {
if (this == &Other) return *this;
this->base_type::operator=(Other);
m_Match = Other.m_Match;
m_End = Other.m_End;
return *this;
})

//! Constructor
/*!
Construct new find_iterator for a given finder
Expand Down Expand Up @@ -248,6 +260,20 @@ namespace boost {
m_bEof(Other.m_bEof)
{}

//! Assignment operator
/*!
Assigns a copy of the split_iterator
*/
BOOST_DEFAULTED_FUNCTION(split_iterator& operator=( const split_iterator& Other ), {
if (this == &Other) return *this;
this->base_type::operator=(Other);
m_Match = Other.m_Match;
m_Next = Other.m_Next;
m_End = Other.m_End;
m_bEof = Other.m_bEof;
return *this;
})

//! Constructor
/*!
Construct new split_iterator for a given finder
Expand Down