|
ESPHome 2026.11.0-dev
|
Lightweight read-only view over a const array stored in RODATA (will typically be in flash memory). More...
#include <helpers.h>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| constexpr | ConstVector ()=default |
| constexpr | ConstVector (const T *data, size_t size) |
| const T * | begin () const |
| const T * | end () const |
| const T * | data () const |
| constexpr size_t | size () const |
| constexpr bool | empty () const |
| const constexpr T & | operator[] (size_t i) const |
| const T & | at (size_t i) const |
Protected Attributes | |
| const T * | data_ {nullptr} |
| size_t | size_ {0} |
Lightweight read-only view over a const array stored in RODATA (will typically be in flash memory).
Iterators are raw pointers like FixedVector. With Owning = true it can also hold a heap copy it owns (see the specialization below); the default view never frees and has no extra cost.
| using esphome::ConstVector< T, Owning >::value_type = T |
|
constexprdefault |
|
inlineconstexpr |
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
protected |
|
protected |