Make enum_iterator bidirectional
This commit is contained in:
parent
466aa717ad
commit
6207df1e9b
1 changed files with 8 additions and 0 deletions
|
|
@ -53,6 +53,14 @@ namespace psemek::util
|
|||
return copy;
|
||||
}
|
||||
|
||||
enum_iterator operator --() { --value; return *this; }
|
||||
enum_iterator operator -- (int)
|
||||
{
|
||||
enum_iterator copy = *this;
|
||||
--(*this);
|
||||
return copy;
|
||||
}
|
||||
|
||||
friend bool operator == (enum_iterator const & it1, enum_iterator const & it2) = default;
|
||||
friend bool operator != (enum_iterator const & it1, enum_iterator const & it2) = default;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue