C++ Actor Framework 1.0.0
|
A copy-on-write vector implementation that wraps a std::vector
.
More...
#include <cow_vector.hpp>
Public Member Functions | |
cow_vector (std_type std) | |
cow_vector (std::initializer_list< T > values) | |
cow_vector (cow_vector &&) noexcept=default | |
cow_vector (const cow_vector &) noexcept=default | |
cow_vector & | operator= (cow_vector &&) noexcept=default |
cow_vector & | operator= (const cow_vector &) noexcept=default |
std_type & | unshared () |
Returns a mutable reference to the managed vector. | |
const std_type & | std () const noexcept |
Returns the managed STD container. | |
bool | unique () const noexcept |
Returns whether the reference count of the managed object is 1. | |
bool | empty () const noexcept |
size_type | size () const noexcept |
size_type | max_size () const noexcept |
T | at (size_type pos) const |
T | operator[] (size_type pos) const |
T | front () const |
T | back () const |
const T * | data () const noexcept |
const_iterator | begin () const noexcept |
const_iterator | cbegin () const noexcept |
const_reverse_iterator | rbegin () const noexcept |
const_reverse_iterator | crbegin () const noexcept |
const_iterator | end () const noexcept |
const_iterator | cend () const noexcept |
const_reverse_iterator | rend () const noexcept |
const_reverse_iterator | crend () const noexcept |
Friends | |
template<class Inspector > | |
bool | inspect (Inspector &f, cow_vector &x) |
A copy-on-write vector implementation that wraps a std::vector
.
std_type & caf::cow_vector< class >::unshared | ( | ) |
Returns a mutable reference to the managed vector.
Copies the vector if more than one reference to it exists to make sure the reference count is exactly 1 when returning from this function.