lsst.sphgeom gb1ff1c2c53+62d12e78cb
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
lsst::sphgeom::RangeSet::Iterator Struct Reference

#include <RangeSet.h>

Public Types

using difference_type = ptrdiff_t
 
using value_type = std::tuple< uint64_t, uint64_t >
 
using pointer = void
 
using reference = std::tuple< uint64_t, uint64_t >
 
using iterator_category = std::input_iterator_tag
 

Public Member Functions

 Iterator (uint64_t const *ptr)
 
Iteratoroperator++ ()
 
Iteratoroperator-- ()
 
Iterator operator++ (int)
 
Iterator operator-- (int)
 
Iterator operator+ (ptrdiff_t n) const
 
Iterator operator- (ptrdiff_t n) const
 
Iteratoroperator+= (ptrdiff_t n)
 
Iteratoroperator-= (ptrdiff_t n)
 
ptrdiff_t operator- (Iterator const &i) const
 
bool operator== (Iterator const &i) const
 
bool operator!= (Iterator const &i) const
 
bool operator< (Iterator const &i) const
 
bool operator> (Iterator const &i) const
 
bool operator<= (Iterator const &i) const
 
bool operator>= (Iterator const &i) const
 
std::tuple< uint64_t, uint64_t > operator* ()
 
std::tuple< uint64_t, uint64_t > operator[] (ptrdiff_t n) const
 

Public Attributes

uint64_t const * p = nullptr
 

Friends

void swap (Iterator &a, Iterator &b)
 
Iterator operator+ (ptrdiff_t n, Iterator const &i)
 

Detailed Description

A constant iterator over the ranges (represented as 2-tuples) in a RangeSet.

RangeSet does not store an array of 2-tuples internally. But, ยง24.2.5 of the C++11 standard requires the following from constant forward iterators:

So, dereferencing a forward iterator cannot return by value, or return a reference to a member of the iterator itself. As a result, it seems impossible to provide more than an input iterator for container objects that do not store their values directly.

While this class only claims to be an input iterator, it nevertheless implements most random access iterator requirements. Dereferencing an iterator returns a tuple by value, and operator-> is omitted.


The documentation for this struct was generated from the following file: