Kaydet (Commit) d26ba190 authored tarafından Michael Stahl's avatar Michael Stahl

sc: std::iterator is deprecated in C++17

Change-Id: I947dcf61e95bdc68d19eab7daca4c31ba8047d5e
Reviewed-on: https://gerrit.libreoffice.org/48224Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 5e7a832b
......@@ -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) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment