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;
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.
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. |