36#ifndef LIB_ITER_ADAPTER_PTR_DEREF_H
37#define LIB_ITER_ADAPTER_PTR_DEREF_H
64 static_assert(std::is_pointer_v<pointer>);
109 :
i_(reinterpret_cast<IT const&> (oIter.
getBase()))
115 i_ =
reinterpret_cast<IT const&
> (ref.
getBase());
120 operator bool()
const
136 return PtrDerefIter (
reinterpret_cast<IT const&
> (srcIter));
194 template<
class I1,
class I2>
197 template<
class I1,
class I2>
259 operator bool()
const
317 template<
class I1,
class I2>
320 template<
class I1,
class I2>
wrapper for an existing Iterator type to expose the address of each value yielded.
IT::pointer const * pointer
AddressExposingIter(IT srcIter)
AddressExposingIter is always created by wrapping an existing iterator.
IT const & getBase() const
access the wrapped implementation iterator
AddressExposingIter & operator++()
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS(AddressExposingIter)
reference operator*() const
IT::pointer const value_type
IT i_
nested source iterator
IT::pointer const & reference
wrapper for an existing Iterator type, automatically dereferencing the output of the former.
IterType< IT >::template SimilarIter< ValueTypeBase ** >::Type WrappedIterType
PtrDerefIter< WrappedConstIterType > ConstIterType
meta::ValueTypeBinding< IT >::value_type pointer
this iterator adapter is meant to wrap an iterator yielding pointer values
PtrDerefIter & operator=(PtrDerefIter< WrappedIterType > const &ref)
PtrDerefIter< WrappedIterType > IterType
std::remove_const_t< value_type > ValueTypeBase
IterType< IT >::template SimilarIter< const ValueTypeBase ** >::Type WrappedConstIterType
static PtrDerefIter build_by_cast(WrappedIterType const &srcIter)
explicit builder to allow creating a const variant from the basic srcIter type.
IT const & getBase() const
access the wrapped implementation iterator
PtrDerefIter(PtrDerefIter< WrappedIterType > const &oIter)
allow copy initialisation also when the wrapped iterator is based on some variation of a pointer.
std::remove_pointer_t< pointer > value_type
reference operator*() const
PtrDerefIter(IT srcIter)
PtrDerefIter is always created by wrapping an existing iterator.
IT i_
nested source iterator
static PtrDerefIter nil()
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS(PtrDerefIter)
pointer operator->() const
PtrDerefIter & operator++()
Helper template(s) for creating Lumiera Forward Iterators.
Implementation namespace for support and library code.
bool operator==(PtrDerefIter< I1 > const &il, PtrDerefIter< I2 > const &ir)
Supporting equality comparisons...
bool operator!=(PtrDerefIter< I1 > const &il, PtrDerefIter< I2 > const &ir)
auto ptrDeref(IT iter)
Convenience shortcut to dereference pointers yielded from the wrapped iterator.