![]() |
Spicy
|
#include <vector.h>
Public Types | |
using | V = std::vector< T, Allocator > |
using | size_type = integer::safe< uint64_t > |
using | reference = T & |
using | const_reference = const T & |
using | iterator = vector::Iterator< T, Allocator > |
using | const_iterator = vector::ConstIterator< T, Allocator > |
using | C = std::shared_ptr< Vector * > |
Public Member Functions | |
Vector (const Vector &other) | |
Vector (Vector &&other) noexcept | |
Vector (std::initializer_list< T > init, const Allocator &alloc=Allocator()) | |
const T & | front () const |
const T & | back () const |
void | pop_back () |
const_iterator | iteratorAt (uint64_t i) const |
Vector< T > | sub (uint64_t start, uint64_t end) const |
Vector< T > | sub (uint64_t end) const |
Vector & | operator= (const Vector &other) |
Vector & | operator= (Vector &&other) noexcept |
const T & | operator[] (uint64_t i) const & |
T | operator[] (uint64_t i) && |
T & | operator[] (uint64_t i) & |
void | assign (uint64_t i, T x) |
Vector | operator+ (const Vector &other) const |
Vector & | operator+= (const Vector &other) |
iterator | insert (iterator pos, const T &value) |
auto | begin () |
auto | end () |
auto | begin () const |
auto | end () const |
auto | cbegin () const |
auto | cend () const |
size_type | size () const |
Public Attributes | |
C | _control = std::make_shared<Vector<T, Allocator>*>(this) |
Friends | |
bool | operator== (const Vector &a, const Vector &b) |
HILTI's Vector
is a std::vector
-like type with additional safety guarantees.
In particular it guarantees that
Vector
is reassigned.If not otherwise specified, member functions have the semantics of std::vector
member functions.
|
inline |
Returns the last element of the vector
.
<tt>IndexError</tt> | if the Vector is empty |
|
inline |
Returns the last element of the vector
.
<tt>IndexError</tt> | if the Vector is empty |
|
inline |
Inserts value before a given position.
pos | iterator to the position preceding the inserted value |
value | value to insert |
|
inline |
Returns an iterator referring to a specific element.
i | index of element |
<tt>IndexError</tt> | if the i is out of range. |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
Accesses specified element.
i | position of the element to return |
<tt>IndexError</tt> | if the position is out of bounds. |
|
inline |
Accesses specified element.
i | position of the element to return |
<tt>IndexError</tt> | if the position is out of bounds. |
|
inline |
Accesses specified element.
i | position of the element to return |
<tt>IndexError</tt> | if the position is out of bounds. |
|
inline |
Removes the last element of the vector
.
<tt>IndexError</tt> | if the Vector is empty |
|
inline |
Extracts a subsequence from the vector.
from | start index |
end | end index (not including) |
|
inline |
Extracts a subsequence from the vector.
end | end index (not including) |