12 using difference_type = std::ptrdiff_t;
15 using iterator_category = std::random_access_iterator_tag;
19 : owner_(owner), index_(index), accessor_(
accessor) {}
22 cached_proxy_ = accessor_(owner_, index_);
28 return &cached_proxy_;
45 return static_cast<difference_type
>(index_) -
static_cast<difference_type
>(
other.index_);
49 return owner_ ==
other.owner_ && index_ ==
other.index_;
53 return !(*
this ==
other);
57 Owner* owner_ =
nullptr;
60 mutable Proxy cached_proxy_;