|
constexpr | List (const std::initializer_list< ValueType > &init) |
|
constexpr List & | operator+= (const List &other) |
| Append another list to the end of this one. More...
|
|
constexpr List | operator+ (const List &other) const |
| Append another list to the end of a copy of this one. More...
|
|
constexpr iterator | begin () |
|
constexpr iterator | end () |
|
constexpr const_iterator | begin () const |
|
constexpr const_iterator | end () const |
|
constexpr bool | empty () const |
|
constexpr uint32_t | size () const |
|
constexpr iterator | erase (const_iterator it) |
|
constexpr iterator | insert (const_iterator before, const ValueType &value) |
|
template<typename It > |
constexpr iterator | insert (const_iterator before, It first, It last) |
|
constexpr iterator | push_front (const ValueType &value) |
|
constexpr iterator | push_back (const ValueType &value) |
|
constexpr iterator | pop_front () |
|
constexpr iterator | pop_back () |
|
template<typename ValueType, int Log2MaxSize = 32>
class sp::c::List< ValueType, Log2MaxSize >
Like std::list
, but for compile-time use.
- Note
- Like all structures in the
sp::c
namespace, this cannot be used at runtime.
- Template Parameters
-
ValueType | The list element type. Must be default constexpr constructible and constexpr copyable or a fundamental data type. |
Log2MaxSize | The maximum size of the list expressed as a log base 2. The default is 32 (enough for about 4 billion elements). The maximum size of the list is 2^Log2MaxSize - 1. This template parameter is useful to limit the address space used by the container (e.g: to nest containers). |