|
constexpr | ArrayRef () |
| Default constructor. More...
|
|
constexpr | ArrayRef (const T *data, std::size_t size) |
| Constructor from a pointer and a size. More...
|
|
| ArrayRef (const std::vector< T > &values) |
| Constructor from a std::vector More...
|
|
template<std::size_t N> |
constexpr | ArrayRef (const T(&data)[N]) |
| Constructor from a static array. More...
|
|
| ArrayRef (std::initializer_list< T > values) |
| Constructor from an initializer list. More...
|
|
constexpr const T * | getData () const |
| Get a pointer to the elements. More...
|
|
constexpr std::size_t | getSize () const |
| Get the number of elements. More...
|
|
constexpr const T * | begin () const |
| Get an iterator to the first element. More...
|
|
constexpr const T * | end () const |
| Get an iterator past the last element. More...
|
|
template<typename T>
class gf::ArrayRef< T >
A constant reference to an array and its size.
This class stores a pointer to some data and its size. It can be built from various inputs: std::vector
, static array, pointer and size.
- See also
- StringRef