C/C++ API Reference
Loading...
Searching...
No Matches
pw::containers::WrappedIterator< Impl, Iterator, ValueType > Class Template Reference

Overview

template<typename Impl, typename Iterator, typename ValueType>
class pw::containers::WrappedIterator< Impl, Iterator, ValueType >

Wraps an iterator with another iterator. This is helpful for creating an iterator that yields items derived from the original iterator's type. For example, the derived iterator might return a member of or a value calculated from the original iterator's value.

Classes inherit from this and provide operator* and operator-> as appropriate.

Public Types

using difference_type = std::ptrdiff_t
 
using value_type = ValueType
 
using pointer = ValueType *
 
using reference = ValueType &
 
using iterator_category = std::bidirectional_iterator_tag
 

Public Member Functions

constexpr WrappedIterator (const WrappedIterator &)=default
 
constexpr WrappedIteratoroperator= (const WrappedIterator &)=default
 
Impl & operator++ ()
 
Impl operator++ (int)
 
Impl & operator-- ()
 
Impl operator-- (int)
 
constexpr bool operator== (const WrappedIterator &other) const
 
constexpr bool operator!= (const WrappedIterator &other) const
 

Protected Member Functions

constexpr WrappedIterator (const Iterator &it)
 
const auto & value () const
 
const auto * ptr () const
 

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