libMesh
|
The IntRange
templated class is intended to make it easy to loop over integers which are indices of a container.
More...
#include <int_range.h>
Classes | |
class | iterator |
Public Member Functions | |
template<typename U , typename V > | |
IntRange (U begin, V end) | |
iterator | begin () const |
iterator | end () const |
Private Attributes | |
iterator | _begin |
iterator | _end |
The IntRange
templated class is intended to make it easy to loop over integers which are indices of a container.
In cases where such a range is defined by the result of a virtual function call, this allows range-based for loops to be easily written which make only a single such call, rather than a new call for each iteration.
We perform a cast_int operation (no-op in opt mode, test+assert in debug) at construction time to make sure that the given range bounds are representable by the given range type.
Definition at line 51 of file int_range.h.
libMesh::IntRange< T >::IntRange | ( | U | begin, |
V | end | ||
) |
Definition at line 84 of file int_range.h.
iterator libMesh::IntRange< T >::begin | ( | ) | const |
iterator libMesh::IntRange< T >::end | ( | ) | const |
|
private |
Definition at line 94 of file int_range.h.
Referenced by libMesh::IntRange< T >::begin().
|
private |
Definition at line 94 of file int_range.h.
Referenced by libMesh::IntRange< T >::end().