mirror of
https://github.com/ceph/ceph
synced 2025-01-01 16:42:29 +00:00
Merge pull request #37626 from tchaikov/wip-drop-std-iterator
include/interval_set: do not inherit from std::iterator Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
This commit is contained in:
commit
b0b3e32d04
@ -113,9 +113,15 @@ class interval_set {
|
||||
friend class interval_set;
|
||||
};
|
||||
|
||||
class const_iterator : public std::iterator <std::forward_iterator_tag, T>
|
||||
class const_iterator
|
||||
{
|
||||
public:
|
||||
using difference_type = ssize_t;
|
||||
using value_type = const typename Map::value_type;
|
||||
using pointer = const typename Map::value_type*;
|
||||
using reference = const typename Map::value_type&;
|
||||
using iterator_category = std::forward_iterator_tag;
|
||||
|
||||
explicit const_iterator(typename Map::const_iterator iter)
|
||||
: _iter(iter)
|
||||
{ }
|
||||
@ -136,7 +142,7 @@ class interval_set {
|
||||
}
|
||||
|
||||
// Dereference this iterator to get a pair.
|
||||
const_reference operator*() const {
|
||||
reference operator*() const {
|
||||
return *_iter;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user