diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-01-19 21:11:49 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-01-22 12:48:48 +0100 |
commit | d26ba19006596d7e97e68dfcca38305c4fc1700f (patch) | |
tree | 63bcd74356c87f77a214ca7ca2f1a1bc6a6577ff /sc/inc | |
parent | 5e7a832bfc98b88821d95743192fde7aba237f56 (diff) |
sc: std::iterator is deprecated in C++17
Change-Id: I947dcf61e95bdc68d19eab7daca4c31ba8047d5e
Reviewed-on: https://gerrit.libreoffice.org/48224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/table.hxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 12a961b59a59..8f84fd475782 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -121,15 +121,16 @@ struct ScInterpreterContext; class ScColumnsRange final { public: - class Iterator final : public std::iterator< - std::input_iterator_tag, // iterator_category - SCCOL, // value_type - SCCOL, // difference_type - const SCCOL*, // pointer - SCCOL> // reference + class Iterator final { std::vector<ScColumn*>::const_iterator maColIter; public: + typedef std::input_iterator_tag iterator_category; + typedef SCCOL value_type; + typedef SCCOL difference_type; + typedef const SCCOL* pointer; + typedef SCCOL reference; + explicit Iterator(std::vector<ScColumn*>::const_iterator colIter) : maColIter(colIter) {} Iterator& operator++() { maColIter++; return *this;} @@ -137,7 +138,7 @@ class ScColumnsRange final bool operator==(Iterator other) const {return maColIter == other.maColIter;} bool operator!=(Iterator other) const {return !(*this == other);} - reference operator*() const {return (*maColIter)->GetCol();} + SCCOL operator*() const {return (*maColIter)->GetCol();} }; ScColumnsRange(Iterator nBegin, Iterator nEnd) : maBegin(nBegin), maEnd(nEnd) {} |