![]() |
Pixie
|
CRTP facade for an immutable positional integer vector. More...
#include <integer_vector.h>
Public Types | |
| using | value_type = Value |
| Stored integer type. | |
| using | size_type = std::size_t |
| Type used for element counts and zero-based positions. | |
Public Member Functions | |
| size_type | size () const |
| Return the logical number of elements. | |
| bool | empty () const |
| Return whether the vector has no elements. | |
| value_type | operator[] (size_type position) const |
Read the element at zero-based position without bounds checking. | |
| value_type | at (size_type position) const |
Read the element at zero-based position with bounds checking. | |
| void | copy_to (size_type begin, std::span< value_type > output) const |
Copy a checked contiguous source range into output. | |
| size_type | memory_usage_bytes () const |
| Return total memory owned by this vector when supported. | |
CRTP facade for an immutable positional integer vector.
| Impl | Concrete implementation providing size_impl(), value_at_impl(), and copy_to_impl(). It may also provide memory_usage_bytes_impl(). |
| Value | Unsigned element type other than bool, no wider than 64 bits. |
Positions are zero-based. Implementations retain ownership and lifetime semantics documented by their concrete types.
|
inline |
Read the element at zero-based position with bounds checking.
| std::out_of_range | if position >= size(). |
|
inline |
Copy a checked contiguous source range into output.
Copies [begin, begin + output.size()). The complete source range is validated before the implementation is called, so an invalid range leaves output unchanged.
| std::out_of_range | if the requested source range is invalid. |
|
inline |
Return total memory owned by this vector when supported.
|
inline |