CXXIter 0.2
Loading...
Searching...
No Matches
CXXIter::trait::ContiguousMemoryIterator< T > Struct Template Reference

Trait, that iterators implement whose elements are stored in a contiguous block of memory. More...

#include <Traits.h>

Collaboration diagram for CXXIter::trait::ContiguousMemoryIterator< T >:

Public Types

using ItemPtr = std::add_pointer_t< std::remove_reference_t< typename Iterator< T >::Item > >
 Pointer type to an item of this iterator. More...
 

Static Public Member Functions

static constexpr ItemPtr currentPtr (typename trait::Iterator< T >::Self &self)=delete
 Get the pointer of the current element. More...
 

Detailed Description

template<typename T>
struct CXXIter::trait::ContiguousMemoryIterator< T >

Trait, that iterators implement whose elements are stored in a contiguous block of memory.

This trait allows downstream elements to assume that it is valid to access following elements by reading from the current element onward.

Definition at line 78 of file Traits.h.

Member Typedef Documentation

◆ ItemPtr

template<typename T >
using CXXIter::trait::ContiguousMemoryIterator< T >::ItemPtr = std::add_pointer_t<std::remove_reference_t<typename Iterator<T>::Item> >

Pointer type to an item of this iterator.

This keeps the const specifier.

Definition at line 83 of file Traits.h.

Member Function Documentation

◆ currentPtr()

template<typename T >
static constexpr ItemPtr CXXIter::trait::ContiguousMemoryIterator< T >::currentPtr ( typename trait::Iterator< T >::Self &  self)
inlinestaticconstexprdelete

Get the pointer of the current element.

Parameters
selfReference to the instance of the class for which trait::ExactSizeIterator is being specialized.
Returns
Pointer of the element that would be returned by the next call to next().

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