37 explicit Iterator(storage_type::const_iterator inner_iter) :
41 using difference_type = storage_type::const_iterator::difference_type;
42 using iterator_category = storage_type::const_iterator::iterator_category;
47 const DeckKeyword& operator*()
const {
return this->inner->get(); }
48 const DeckKeyword* operator->()
const {
return &this->inner->get(); }
50 Iterator& operator++() { ++this->inner;
return *
this; }
51 Iterator operator++(
int) {
auto tmp = *
this; ++this->inner;
return tmp; }
53 Iterator& operator--() { --this->inner;
return *
this; }
54 Iterator operator--(
int) {
auto tmp = *
this; --this->inner;
return tmp; }
56 Iterator::difference_type operator-(
const Iterator &other)
const {
return this->inner - other.inner; }
57 Iterator operator+(Iterator::difference_type shift)
const { Iterator tmp = *
this; tmp.inner += shift;
return tmp;}
59 friend bool operator== (
const Iterator& a,
const Iterator& b) {
return a.inner == b.inner; };
60 friend bool operator<= (
const Iterator& a,
const Iterator& b) {
return a.inner <= b.inner; };
61 friend bool operator!= (
const Iterator& a,
const Iterator& b) {
return a.inner != b.inner; };
64 storage_type::const_iterator inner;