rd-cpp/src/rd_core_cpp/src/main/reactive/ViewableList.h [57:160]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - typename data_t::iterator it_; explicit iterator(const typename data_t::iterator& it) : it_(it) { } public: using iterator_category = std::random_access_iterator_tag; using value_type = T; using difference_type = std::ptrdiff_t; using pointer = T const*; using reference = T const&; iterator(const iterator& other) = default; iterator(iterator&& other) noexcept = default; iterator& operator=(const iterator& other) = default; iterator& operator=(iterator&& other) noexcept = default; iterator& operator++() { ++it_; return *this; } iterator operator++(int) { auto it = *this; ++*this; return it; } iterator& operator--() { --it_; return *this; } iterator operator--(int) { auto it = *this; --*this; return it; } iterator& operator+=(difference_type delta) { it_ += delta; return *this; } iterator& operator-=(difference_type delta) { it_ -= delta; return *this; } iterator operator+(difference_type delta) const { auto it = *this; return it += delta; } iterator operator-(difference_type delta) const { auto it = *this; return it -= delta; } difference_type operator-(iterator const& other) const { return it_ - other.it_; } bool operator<(iterator const& other) const noexcept { return this->it_ < other.it_; } bool operator>(iterator const& other) const noexcept { return this->it_ > other.it_; } bool operator==(iterator const& other) const noexcept { return this->it_ == other.it_; } bool operator!=(iterator const& other) const noexcept { return !(*this == other); } bool operator<=(iterator const& other) const noexcept { return (this->it_ < other.it_) || (*this == other); } bool operator>=(iterator const& other) const noexcept { return (this->it_ > other.it_) || (*this == other); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rd-cpp/src/rd_core_cpp/src/main/reactive/ViewableSet.h [50:153]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - typename data_t::iterator it_; explicit iterator(const typename data_t::iterator& it) : it_(it) { } public: using iterator_category = std::random_access_iterator_tag; using value_type = T; using difference_type = std::ptrdiff_t; using pointer = T const*; using reference = T const&; iterator(const iterator& other) = default; iterator(iterator&& other) noexcept = default; iterator& operator=(const iterator& other) = default; iterator& operator=(iterator&& other) noexcept = default; iterator& operator++() { ++it_; return *this; } iterator operator++(int) { auto it = *this; ++*this; return it; } iterator& operator--() { --it_; return *this; } iterator operator--(int) { auto it = *this; --*this; return it; } iterator& operator+=(difference_type delta) { it_ += delta; return *this; } iterator& operator-=(difference_type delta) { it_ -= delta; return *this; } iterator operator+(difference_type delta) const { auto it = *this; return it += delta; } iterator operator-(difference_type delta) const { auto it = *this; return it -= delta; } difference_type operator-(iterator const& other) const { return it_ - other.it_; } bool operator<(iterator const& other) const noexcept { return this->it_ < other.it_; } bool operator>(iterator const& other) const noexcept { return this->it_ > other.it_; } bool operator==(iterator const& other) const noexcept { return this->it_ == other.it_; } bool operator!=(iterator const& other) const noexcept { return !(*this == other); } bool operator<=(iterator const& other) const noexcept { return (this->it_ < other.it_) || (*this == other); } bool operator>=(iterator const& other) const noexcept { return (this->it_ > other.it_) || (*this == other); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -