Add operator* to store::iterator. (#4493)

This commit is contained in:
clemahieu 2024-03-16 15:44:24 +00:00 committed by GitHub
commit 89317dc542
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,10 @@ public:
{ {
return &current; return &current;
} }
std::pair<T, U> const & operator* () const
{
return current;
}
bool operator== (iterator<T, U> const & other_a) const bool operator== (iterator<T, U> const & other_a) const
{ {
return (impl == nullptr && other_a.impl == nullptr) || (impl != nullptr && *impl == other_a.impl.get ()) || (other_a.impl != nullptr && *other_a.impl == impl.get ()); return (impl == nullptr && other_a.impl == nullptr) || (impl != nullptr && *impl == other_a.impl.get ()) || (other_a.impl != nullptr && *other_a.impl == impl.get ());