diff --git a/include/xlnt/workbook/worksheet_iterator.hpp b/include/xlnt/workbook/worksheet_iterator.hpp index 3e0165fb..7647857a 100644 --- a/include/xlnt/workbook/worksheet_iterator.hpp +++ b/include/xlnt/workbook/worksheet_iterator.hpp @@ -53,6 +53,11 @@ public: using pointer = worksheet *; using reference = worksheet; // intentionally value + /// + /// Default Constructs a worksheet iterator + /// + worksheet_iterator() = default; + /// /// Constructs a worksheet iterator from a workbook and sheet index. /// @@ -135,12 +140,12 @@ private: /// /// The target workbook of this iterator. /// - workbook *wb_; + workbook *wb_ = nullptr; /// /// The index of the worksheet in wb_ this iterator is currently pointing to. /// - std::size_t index_; + std::size_t index_ = 0; }; @@ -159,6 +164,11 @@ public: using pointer = const worksheet *; using reference = const worksheet; // intentionally value + /// + /// Default Constructs a worksheet iterator + /// + const_worksheet_iterator() = default; + /// /// Constructs a worksheet iterator from a workbook and sheet index. /// @@ -234,12 +244,12 @@ private: /// /// The target workbook of this iterator. /// - const workbook *wb_; + const workbook *wb_ = nullptr; /// /// The index of the worksheet in wb_ this iterator is currently pointing to. /// - std::size_t index_; + std::size_t index_ = 0; }; } // namespace xlnt