LLVM
15.0.0git
|
The class represents the base of a range of indexed_accessor_iterators. More...
#include "llvm/ADT/STLExtras.h"
Classes | |
class | iterator |
An iterator element of this range. More... | |
Public Types | |
using | RangeBaseT = indexed_accessor_range_base |
Public Member Functions | |
indexed_accessor_range_base (iterator begin, iterator end) | |
indexed_accessor_range_base (const iterator_range< iterator > &range) | |
indexed_accessor_range_base (BaseT base, ptrdiff_t count) | |
iterator | begin () const |
iterator | end () const |
ReferenceT | operator[] (size_t Index) const |
ReferenceT | front () const |
ReferenceT | back () const |
size_t | size () const |
Return the size of this range. More... | |
bool | empty () const |
Return if the range is empty. More... | |
DerivedT | slice (size_t n, size_t m) const |
Drop the first N elements, and keep M elements. More... | |
DerivedT | drop_front (size_t n=1) const |
Drop the first n elements. More... | |
DerivedT | drop_back (size_t n=1) const |
Drop the last n elements. More... | |
DerivedT | take_front (size_t n=1) const |
Take the first n elements. More... | |
DerivedT | take_back (size_t n=1) const |
Take the last n elements. More... | |
template<typename RangeT , typename = std::enable_if_t<std::is_constructible< RangeT, iterator_range<iterator>>::value>> | |
operator RangeT () const | |
Allow conversion to any type accepting an iterator_range. More... | |
const BaseT & | getBase () const |
Returns the base of this range. More... | |
Protected Member Functions | |
indexed_accessor_range_base (const indexed_accessor_range_base &)=default | |
indexed_accessor_range_base (indexed_accessor_range_base &&)=default | |
indexed_accessor_range_base & | operator= (const indexed_accessor_range_base &)=default |
Protected Attributes | |
BaseT | base |
The base that owns the provided range of values. More... | |
ptrdiff_t | count |
The size from the owning range. More... | |
Friends | |
template<typename OtherT > | |
bool | operator== (const indexed_accessor_range_base &lhs, const OtherT &rhs) |
Compare this range with another. More... | |
template<typename OtherT > | |
bool | operator!= (const indexed_accessor_range_base &lhs, const OtherT &rhs) |
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:
Definition at line 1138 of file STLExtras.h.
using llvm::detail::indexed_accessor_range_base< DerivedT, BaseT, T, PointerT, ReferenceT >::RangeBaseT = indexed_accessor_range_base |
Definition at line 1140 of file STLExtras.h.
|
inline |
Definition at line 1160 of file STLExtras.h.
|
inline |
Definition at line 1163 of file STLExtras.h.
|
inline |
Definition at line 1165 of file STLExtras.h.
|
protecteddefault |
|
protecteddefault |
|
inline |
Definition at line 1178 of file STLExtras.h.
|
inline |
Definition at line 1168 of file STLExtras.h.
|
inline |
Drop the last n elements.
Definition at line 1213 of file STLExtras.h.
Referenced by llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::take_front().
|
inline |
Drop the first n elements.
Definition at line 1208 of file STLExtras.h.
Referenced by llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::take_back().
|
inline |
Return if the range is empty.
Definition at line 1199 of file STLExtras.h.
Referenced by llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::back(), and llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::front().
|
inline |
Definition at line 1169 of file STLExtras.h.
|
inline |
Definition at line 1174 of file STLExtras.h.
|
inline |
Returns the base of this range.
Definition at line 1238 of file STLExtras.h.
|
inline |
Allow conversion to any type accepting an iterator_range.
Definition at line 1233 of file STLExtras.h.
|
protecteddefault |
|
inline |
Definition at line 1170 of file STLExtras.h.
|
inline |
Return the size of this range.
Definition at line 1196 of file STLExtras.h.
Referenced by llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::back(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::drop_back(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::drop_front(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::empty(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::operator[](), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::slice(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::take_back(), and llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::take_front().
|
inline |
Drop the first N elements, and keep M elements.
Definition at line 1202 of file STLExtras.h.
Referenced by llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::drop_front().
|
inline |
Take the last n elements.
Definition at line 1225 of file STLExtras.h.
|
inline |
Take the first n elements.
Definition at line 1219 of file STLExtras.h.
|
friend |
Definition at line 1190 of file STLExtras.h.
|
friend |
Compare this range with another.
Definition at line 1185 of file STLExtras.h.
|
protected |
The base that owns the provided range of values.
Definition at line 1253 of file STLExtras.h.
Referenced by llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::begin(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::drop_back(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::end(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::getBase(), llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::operator[](), and llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::slice().
|
protected |
The size from the owning range.
Definition at line 1255 of file STLExtras.h.
Referenced by llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::end(), and llvm::detail::indexed_accessor_range_base< DerivedT, std::pair< BaseT, ptrdiff_t >, T, T *, T & >::size().