Skip to content

Commit

Permalink
Merge pull request #47 from mshabunin/cpp-17
Browse files Browse the repository at this point in the history
build: remove deprecated std::iterator usage
  • Loading branch information
dmatveev authored Oct 21, 2024
2 parents 0e8a2cc + 9659e1b commit a40f6d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sources/ade/include/ade/util/md_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ inline SliceDimension make_dimension(int l, int s) //TODO: move to C++14
}

template<typename ParentT, typename DiffT = int>
class MdViewIteratorImpl final : public std::iterator<std::random_access_iterator_tag, DiffT>
class MdViewIteratorImpl final
{
ParentT* m_parent = nullptr;
int m_currentPos = -1;
Expand All @@ -70,6 +70,13 @@ class MdViewIteratorImpl final : public std::iterator<std::random_access_iterato

using diff_t = DiffT;
using val_t = decltype(ParentT()[0]);

using iterator_category = std::random_access_iterator_tag;
using value_type = val_t;
using difference_type = diff_t;
using pointer = val_t*;
using reference = val_t&;

public:

MdViewIteratorImpl() = default;
Expand Down

0 comments on commit a40f6d1

Please sign in to comment.