Template Class ExprIteratorImpl

Class Documentation

template<bool is_const>
class ExprIteratorImpl

Public Types

using value_type = ExprPtr
using reference = std::add_lvalue_reference_t<std::conditional_t<is_const, std::add_const_t<value_type>, value_type>>
using const_reference = std::add_lvalue_reference_t<std::add_const_t<value_type>>
using pointer = std::add_pointer_t<std::conditional_t<is_const, std::add_const_t<value_type>, value_type>>
using difference_type = std::ptrdiff_t

Public Functions

inline explicit ExprIteratorImpl(pointer ptr = nullptr)
template<bool other_is_const>
inline ExprIteratorImpl(const ExprIteratorImpl<other_is_const> &other)

converting constructor: a mutable iterator converts to a const iterator (but not the other way around)

Note

this is a constructor template on purpose: that way it is never considered a copy constructor and thus never suppresses the implicitly-declared one

inline ExprIteratorImpl &operator+=(difference_type val)
inline ExprIteratorImpl &operator++()
inline ExprIteratorImpl operator++(int)
inline ExprIteratorImpl &operator-=(difference_type val)
inline ExprIteratorImpl &operator--()
inline ExprIteratorImpl operator--(int)
inline reference operator*() const
inline pointer operator->() const
template<bool other_is_const>
inline difference_type operator-(const ExprIteratorImpl<other_is_const> &other) const
template<bool other_is_const>
inline bool operator==(const ExprIteratorImpl<other_is_const> &other) const
inline reference operator[](difference_type offset) const
template<bool other_is_const>
inline std::strong_ordering operator<=>(const ExprIteratorImpl<other_is_const> &other) const

Friends

inline friend ExprIteratorImpl operator+(const ExprIteratorImpl &it, difference_type val)
inline friend ExprIteratorImpl operator+(difference_type val, const ExprIteratorImpl &it)
inline friend ExprIteratorImpl operator-(const ExprIteratorImpl &it, difference_type val)