diff --git a/include/xlnt/worksheet/cell_iterator.hpp b/include/xlnt/worksheet/cell_iterator.hpp index 5f7b24eb..64e5c9b2 100644 --- a/include/xlnt/worksheet/cell_iterator.hpp +++ b/include/xlnt/worksheet/cell_iterator.hpp @@ -64,12 +64,27 @@ public: /// /// Constructs a cell_iterator as a copy of an existing cell_iterator. /// - cell_iterator(const cell_iterator &other); + cell_iterator(const cell_iterator &) = default; /// /// Assigns this iterator to match the data in rhs. /// - cell_iterator &operator=(const cell_iterator &rhs) = default; + cell_iterator &operator=(const cell_iterator &) = default; + + /// + /// Constructs a cell_iterator by moving from a cell_iterator temporary + /// + cell_iterator(const cell_iterator &&) = default; + + /// + /// Assigns this iterator to from a cell_iterator temporary + /// + cell_iterator &operator=(const cell_iterator &&) = default; + + /// + /// destructor for const_cell_iterator + /// + ~cell_iterator() = default; /// /// Dereferences this iterator to return the cell it points to. @@ -169,15 +184,29 @@ public: const range_reference &limits, major_order order, bool skip_null, bool wrap); /// - /// Constructs a cell_iterator as a copy of an existing cell_iterator. + /// Constructs a const_cell_iterator as a copy of an existing cell_iterator. /// - const_cell_iterator(const const_cell_iterator &other); + const_cell_iterator(const const_cell_iterator &) = default; /// /// Assigns this iterator to match the data in rhs. /// const_cell_iterator &operator=(const const_cell_iterator &) = default; + /// + /// Constructs a const_cell_iterator by moving from a const_cell_iterator temporary + /// + const_cell_iterator(const const_cell_iterator &&) = default; + + /// + /// Assigns this iterator to from a const_cell_iterator temporary + /// + const_cell_iterator &operator=(const const_cell_iterator &&) = default; + + /// + /// destructor for const_cell_iterator + /// + ~const_cell_iterator() = default; /// /// Dereferences this iterator to return the cell it points to. /// diff --git a/source/worksheet/cell_iterator.cpp b/source/worksheet/cell_iterator.cpp index bad750ba..25aa7196 100644 --- a/source/worksheet/cell_iterator.cpp +++ b/source/worksheet/cell_iterator.cpp @@ -58,16 +58,6 @@ const_cell_iterator::const_cell_iterator(worksheet ws, const cell_reference &cur } } -cell_iterator::cell_iterator(const cell_iterator &other) -{ - *this = other; -} - -const_cell_iterator::const_cell_iterator(const const_cell_iterator &other) -{ - *this = other; -} - bool cell_iterator::operator==(const cell_iterator &other) const { return ws_ == other.ws_