diff options
| author | Helmut Grohne <helmut@subdivi.de> | 2022-03-21 06:02:47 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2022-03-21 09:11:33 +0100 |
| commit | 84f5ff06f0c7dbe10f5ec8452521bd79262bc05b (patch) | |
| tree | 746b80486e4e28f8f5b56f947b46a48b2ab3f492 /apt-pkg/cacheset.h | |
| parent | 70f0f4e61169bfbfe2c3eef82714eec4450ffe38 (diff) | |
Avoid use of deprecated std::iterator (twice)
Closes: #1008036
Diffstat (limited to 'apt-pkg/cacheset.h')
| -rw-r--r-- | apt-pkg/cacheset.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 383d26b76..4ea78bcae 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -203,12 +203,16 @@ private: }; /*}}}*/ // Iterator templates for our Containers /*{{{*/ template<typename Interface, typename Master, typename iterator_type, typename container_iterator, typename container_value> class Container_iterator_base : - public std::iterator<typename std::iterator_traits<container_iterator>::iterator_category, container_value>, public Interface::template iterator_base<iterator_type> { protected: container_iterator _iter; public: + using iterator_category = typename std::iterator_traits<container_iterator>::iterator_category; + using value_type = container_value; + using difference_type = std::ptrdiff_t; + using pointer = container_value*; + using reference = container_value&; explicit Container_iterator_base(container_iterator const &i) : _iter(i) {} inline container_value operator*(void) const { return static_cast<iterator_type const*>(this)->getType(); }; operator container_iterator(void) const { return _iter; } |
