Celeritas
0.5.0-86+4a8eea4
|
Access data in a Range<T2> with an index of type T1. More...
#include <Collection.hh>
Public Types | |
Type aliases | |
using | key_type = T1 |
using | mapped_type = T2 |
Public Member Functions | |
CELER_FUNCTION | ItemMap (Range< T2 > range) |
Contruct from an exising Range<T2> | |
CELER_FORCEINLINE_FUNCTION T2 | operator[] (T1 id) const |
Access Range via OpaqueId of type T1. | |
CELER_FORCEINLINE_FUNCTION bool | empty () const |
Whether the underlying Range<T2> is empty. | |
CELER_FORCEINLINE_FUNCTION size_type | size () const |
Size of the underlying Range<T2> | |
Access data in a Range<T2> with an index of type T1.
Here, T1 and T2 are expected to be OpaqueId types. This is simply a type-safe "offset" with range checking.