Range of indexed accessor iterators over a non‐indexable base.
Synopsis
Declared in <llvm/ADT/STLExtras.h>
template<
typename DerivedT,
typename BaseT,
typename T,
typename PointerT = T*,
typename ReferenceT = T&>
class indexed_accessor_range
: public /* implementation-defined */
Description
Ranges with offsetable bases should derive from indexed_accessor_range_base instead. Derived range classes are expected to implement the following static method: * ReferenceT dereference(const BaseT &base, ptrdiff_t index)
-
Dereference an iterator pointing to a parent base at the given index.
Base Classes
Name |
Description |
|
The class represents the base of a range of indexed_accessor_iterators. It provides support for many different range functionalities, e.g. drop_front/slice/etc.. Derived range classes must implement the following static methods: * ReferenceT dereference_iterator(const BaseT &base, ptrdiff_t index) ‐ Dereference an iterator pointing to the base object at the given index. * BaseT offset_base(const BaseT &base, ptrdiff_t index) ‐ Return a new base that is offset from the provide base by 'index' elements. |
Types
Name |
Description |
An iterator element of this range. |
Type Aliases
Name |
Description |
Self type used by derived range classes. |
Member Functions
Name |
Description |
|
Construct a range over |
Return the last element of the range. |
|
Return an iterator to the first element. |
|
Drop the last |
|
Drop the first |
|
Return if the range is empty. |
|
Return an iterator past the last element. |
|
Return the first element of the range. |
|
Returns the current base of the range. |
|
Returns the current start index of the range. |
|
Return the element at |
|
Return the size of this range. |
|
Drop the first |
|
Take the last |
|
Take the first |
|
Allow conversion to any type accepting an iterator_range. |
Static Member Functions
Name |
Description |
Dereference the element at |
|
Return |
Using Declarations
Name |
Description |
Inherit the base range constructors. |
Protected Member Functions
Name |
Description |
Copy‐assign an indexed accessor range base. |