casacore
|
A container similar to std::vector, but one that allows construction without initializing its elements. More...
#include <uvector.h>
Public Types | |
typedef Tp | value_type |
Element type. More... | |
typedef Alloc | allocator_type |
Type of allocator used to allocate and deallocate space. More... | |
typedef Tp & | reference |
Reference to element type. More... | |
typedef const Tp & | const_reference |
Constant reference to element type. More... | |
typedef Tp * | pointer |
Pointer to element type. More... | |
typedef const Tp * | const_pointer |
Pointer to constant element type. More... | |
typedef Tp * | iterator |
Iterator type. More... | |
typedef const Tp * | const_iterator |
Iterator type of constant elements. More... | |
typedef std::reverse_iterator < iterator > | reverse_iterator |
Reverse iterator type. More... | |
typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
Reverse iterator of constant elements. More... | |
typedef std::ptrdiff_t | difference_type |
Difference between to iterators. More... | |
typedef std::size_t | size_t |
Type used for indexing elements. More... | |
typedef std::size_t | size_type |
Type used for indexing elements. More... | |
Public Member Functions | |
uvector (const allocator_type &allocator=Alloc()) noexcept | |
Construct an empty uvector. More... | |
uvector (size_t n) | |
Construct a vector with given amount of elements, without initializing these. More... | |
uvector (size_t n, const value_type &val, const allocator_type &allocator=Alloc()) | |
Construct a vector with given amount of elements and set these to a specific value. More... | |
template<class InputIterator > | |
uvector (InputIterator first, InputIterator last, const allocator_type &allocator=Alloc()) | |
Construct a vector by copying elements from a range. More... | |
uvector (const uvector< Tp, Alloc > &other) | |
Copy construct a uvector. More... | |
uvector (const uvector< Tp, Alloc > &other, const allocator_type &allocator) | |
Copy construct a uvector with custom allocator. More... | |
uvector (uvector< Tp, Alloc > &&other) noexcept | |
Move construct a uvector. More... | |
uvector (uvector< Tp, Alloc > &&other, const allocator_type &allocator) noexcept | |
Move construct a uvector with custom allocator. More... | |
uvector (std::initializer_list< Tp > initlist, const allocator_type &allocator=Alloc()) | |
Construct a uvector from a initializer list. More... | |
~uvector () noexcept | |
Destructor. More... | |
uvector & | operator= (const uvector< Tp, Alloc > &other) |
Assign another uvector to this uvector. More... | |
uvector & | operator= (uvector< Tp, Alloc > &&other) noexcept(std::allocator_traits< Alloc >::propagate_on_container_move_assignment::value||allocator_is_always_equal::value) |
Assign another uvector to this uvector. More... | |
iterator | begin () noexcept |
Get iterator to first element. More... | |
const_iterator | begin () const noexcept |
Get constant iterator to first element. More... | |
iterator | end () noexcept |
Get iterator to element past last element. More... | |
const_iterator | end () const noexcept |
Get constant iterator to element past last element. More... | |
reverse_iterator | rbegin () noexcept |
Get reverse iterator to last element. More... | |
const_reverse_iterator | rbegin () const noexcept |
Get constant reverse iterator to last element. More... | |
reverse_iterator | rend () noexcept |
Get reverse iterator to element before first element. More... | |
const_reverse_iterator | rend () const noexcept |
Get constant reverse iterator to element before first element. More... | |
const_iterator | cbegin () const noexcept |
Get constant iterator to first element. More... | |
const_iterator | cend () const noexcept |
Get constant iterator to element past last element. More... | |
const_reverse_iterator | crbegin () const noexcept |
Get constant reverse iterator to last element. More... | |
const_reverse_iterator | crend () const noexcept |
Get constant reverse iterator to element before first element. More... | |
size_t | size () const noexcept |
Get number of elements in container. More... | |
size_t | max_size () const noexcept |
Get maximum number of elements that this container can hold. More... | |
void | resize (size_t n) |
Change the number of elements in the container. More... | |
void | resize (size_t n, const Tp &val) |
Change the number of elements in the container. More... | |
size_t | capacity () const noexcept |
Get the number of elements the container can currently hold without reallocating storage. More... | |
bool | empty () const noexcept |
Determine if the container is currently empty. More... | |
void | reserve (size_t n) |
Reserve space for a number of elements, to prevent the overhead of extra reallocations. More... | |
void | shrink_to_fit () |
Change the capacity of the container such that no extra space is hold. More... | |
Tp & | operator[] (size_t index) noexcept |
Get a reference to the element at the given index. More... | |
const Tp & | operator[] (size_t index) const noexcept |
Get a constant reference to the element at the given index. More... | |
Tp & | at (size_t index) |
Get a reference to the element at the given index with bounds checking. More... | |
const Tp & | at (size_t index) const |
Get a constant reference to the element at the given index with bounds checking. More... | |
Tp & | front () noexcept |
Get reference to first element in container. More... | |
const Tp & | front () const noexcept |
Get constant reference to first element in container. More... | |
Tp & | back () noexcept |
Get reference to last element in container. More... | |
const Tp & | back () const noexcept |
Get constant reference to last element in container. More... | |
Tp * | data () noexcept |
Get pointer to internal storage. More... | |
const Tp * | data () const noexcept |
Get constant pointer to internal storage. More... | |
template<class InputIterator > | |
void | assign (InputIterator first, InputIterator last) |
Assign this container to be equal to the given range. More... | |
void | assign (size_t n, const Tp &val) |
Resize the container and assign the given value to all elements. More... | |
void | assign (std::initializer_list< Tp > initlist) |
Assign this container to an initializer list. More... | |
void | push_back (const Tp &item) |
Add the given value to the end of the container. More... | |
void | push_back (Tp &&item) |
Add the given value to the end of the container by moving it in. More... | |
void | pop_back () |
Remove the last element from the container. More... | |
iterator | insert (const_iterator position, const Tp &item) |
Insert an element at a given position. More... | |
iterator | insert (const_iterator position, size_t n, const Tp &val) |
Insert elements at a given position and initialize them with a value. More... | |
template<class InputIterator > | |
iterator | insert (const_iterator position, InputIterator first, InputIterator last) |
Insert elements at a given position and initialize them from a range. More... | |
iterator | insert (const_iterator position, Tp &&item) |
Insert an element at a given position by moving it in. More... | |
iterator | insert (const_iterator position, std::initializer_list< Tp > initlist) |
Insert elements at a given position and initialize them from a initializer list. More... | |
iterator | erase (const_iterator position) |
Delete an element from the container. More... | |
iterator | erase (const_iterator first, const_iterator last) |
Delete a range of elements from the container. More... | |
void | swap (uvector< Tp, Alloc > &other) noexcept |
Swap the contents of this uvector with the given uvector. More... | |
void | clear () |
Remove all elements from the container. More... | |
template<typename... Args> | |
iterator | emplace (const_iterator position, Args &&...args) |
Insert an element at a given position by constructing it in place. More... | |
template<typename... Args> | |
void | emplace_back (Args &&...args) |
Add the given value to the end of the container by constructing it in place. More... | |
allocator_type | get_allocator () const noexcept |
Get a copy of the allocator. More... | |
iterator | insert_uninitialized (const_iterator position, size_t n) |
— NON STANDARD METHODS — More... | |
template<class InputIterator > | |
void | push_back (InputIterator first, InputIterator last) |
Add a range of items to the end of the container. More... | |
void | push_back (size_t n, const Tp &val) |
Add elements at the end and initialize them with a value. More... | |
void | push_back (std::initializer_list< Tp > initlist) |
Add elements from an initializer list to the end of the container. More... | |
void | push_back_uninitialized (size_t n) |
Add elements at the end without initializing them. More... | |
Private Types | |
typedef std::false_type | allocator_is_always_equal |
Private Member Functions | |
pointer | allocate (size_t n) |
void | deallocate () noexcept |
void | deallocate (pointer begin, size_t n) noexcept |
template<typename InputIterator > | |
void | construct_from_range (InputIterator first, InputIterator last, std::false_type) |
template<typename Integral > | |
void | construct_from_range (Integral n, Integral val, std::true_type) |
template<typename InputIterator > | |
void | construct_from_range (InputIterator first, InputIterator last, std::forward_iterator_tag) |
template<typename InputIterator > | |
void | assign_from_range (InputIterator first, InputIterator last, std::false_type) |
template<typename Integral > | |
void | assign_from_range (Integral n, Integral val, std::true_type) |
This function is called from assign(iter,iter) when Tp is an integral. More... | |
template<typename InputIterator > | |
void | assign_from_range (InputIterator first, InputIterator last, std::forward_iterator_tag) |
template<typename InputIterator > | |
iterator | insert_from_range (const_iterator position, InputIterator first, InputIterator last, std::false_type) |
template<typename Integral > | |
iterator | insert_from_range (const_iterator position, Integral n, Integral val, std::true_type) |
template<typename InputIterator > | |
iterator | insert_from_range (const_iterator position, InputIterator first, InputIterator last, std::forward_iterator_tag) |
void | check_bounds (size_t index) const |
size_t | enlarge_size (size_t extra_space_needed) const noexcept |
void | enlarge (size_t newSize) |
void | enlarge_for_insert (size_t newSize, size_t insert_position, size_t insert_count) |
uvector & | assign_copy_from (const uvector< Tp, Alloc > &other, std::false_type) |
implementation of operator=(const&) without propagate_on_container_copy_assignment More... | |
uvector & | assign_copy_from (const uvector< Tp, Alloc > &other, std::true_type) |
implementation of operator=(const&) with propagate_on_container_copy_assignment More... | |
uvector & | assign_move_from (uvector< Tp, Alloc > &&other, std::false_type) noexcept(allocator_is_always_equal::value) |
implementation of operator=() without propagate_on_container_move_assignment More... | |
uvector & | assign_move_from (uvector< Tp, Alloc > &&other, std::true_type) noexcept |
implementation of operator=() with propagate_on_container_move_assignment More... | |
void | swap (uvector< Tp, Alloc > &other, std::true_type) noexcept |
implementation of swap with propagate_on_container_swap More... | |
void | swap (uvector< Tp, Alloc > &other, std::false_type) noexcept |
implementation of swap without propagate_on_container_swap More... | |
template<typename InputIterator > | |
void | push_back_range (InputIterator first, InputIterator last, std::false_type) |
template<typename Integral > | |
void | push_back_range (Integral n, Integral val, std::true_type) |
This function is called from push_back(iter,iter) when Tp is an integral. More... | |
template<typename InputIterator > | |
void | push_back_range (InputIterator first, InputIterator last, std::forward_iterator_tag) |
Private Attributes | |
pointer | _begin |
pointer | _end |
pointer | _endOfStorage |
A container similar to std::vector, but one that allows construction without initializing its elements.
This container is similar to a std::vector, except that it can be constructed without initializing its elements. This saves the overhead of initialization, hence the constructor uvector(size_t) is significantly faster than the corresponding std::vector constructor, and has no overhead compared to a manually allocated array.
Probably its greatest strength lies in the construction of containers with a number of elements that is runtime defined, but that will be initialized later. For example:
However, it has a few more use-cases with improved performance over std::vector. This is possible because of more strengent requirements on the element's type.
The container will behave correctly with any trivial type, but will not work for almost all non-trivial types.
The methods with different semantics compared to std::vector are:
Also the following new members are introduced:
All other members work exactly like std::vector's members, although some are slightly faster because of the stricter requirements on the element type.
Tp | Container's element type |
Alloc | Allocator type. Default is to use the std::allocator. |
|
private |
typedef Alloc ao::uvector< Tp, Alloc >::allocator_type |
typedef const Tp* ao::uvector< Tp, Alloc >::const_iterator |
typedef const Tp* ao::uvector< Tp, Alloc >::const_pointer |
typedef const Tp& ao::uvector< Tp, Alloc >::const_reference |
typedef std::reverse_iterator<const_iterator> ao::uvector< Tp, Alloc >::const_reverse_iterator |
typedef std::ptrdiff_t ao::uvector< Tp, Alloc >::difference_type |
typedef Tp* ao::uvector< Tp, Alloc >::iterator |
typedef Tp* ao::uvector< Tp, Alloc >::pointer |
typedef Tp& ao::uvector< Tp, Alloc >::reference |
typedef std::reverse_iterator<iterator> ao::uvector< Tp, Alloc >::reverse_iterator |
typedef std::size_t ao::uvector< Tp, Alloc >::size_t |
typedef std::size_t ao::uvector< Tp, Alloc >::size_type |
typedef Tp ao::uvector< Tp, Alloc >::value_type |
|
inlineexplicitnoexcept |
|
inlineexplicit |
Construct a vector with given amount of elements, without initializing these.
This constructor deviates from std::vector's behaviour, because it will not value construct its elements. It is therefore faster than the corresponding constructor of std::vector.
n | Number of elements that the uvector will be initialized with. |
|
inline |
Construct a vector with given amount of elements and set these to a specific value.
This constructor will initialize its members with the given value.
n | Number of elements that the uvector will be initialized with. |
val | Value to initialize all elements with |
allocator | Allocator used for allocating and deallocating memory. |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlineprivate |
Definition at line 839 of file uvector.h.
Referenced by ao::uvector< value_t >::assign(), ao::uvector< value_t >::assign_copy_from(), ao::uvector< value_t >::assign_from_range(), ao::uvector< value_t >::construct_from_range(), ao::uvector< value_t >::enlarge(), ao::uvector< value_t >::enlarge_for_insert(), ao::uvector< value_t >::reserve(), ao::uvector< value_t >::resize(), and ao::uvector< value_t >::shrink_to_fit().
|
inline |
|
inline |
|
inline |
|
inlineprivate |
implementation of operator=(const&) without propagate_on_container_copy_assignment
Definition at line 1007 of file uvector.h.
Referenced by ao::uvector< value_t >::assign_copy_from(), ao::uvector< value_t >::assign_move_from(), and ao::uvector< value_t >::operator=().
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivatenoexcept |
implementation of operator=() without propagate_on_container_move_assignment
We should not propagate the allocator and the allocators are different. This means we can not swap the allocated space, since then we would deallocate the space with a different allocator type. Therefore, we need to copy:
Definition at line 1042 of file uvector.h.
Referenced by ao::uvector< value_t >::operator=().
|
inlineprivatenoexcept |
implementation of operator=() with propagate_on_container_move_assignment
|
inline |
|
inline |
|
inlinenoexcept |
Get reference to last element in container.
Definition at line 439 of file uvector.h.
Referenced by dyscostman::StochasticEncoder< ValueType >::Dictionary::largest_value().
|
inlinenoexcept |
|
inlinenoexcept |
Get iterator to first element.
Definition at line 263 of file uvector.h.
Referenced by dyscostman::StochasticEncoder< ValueType >::Dictionary::begin(), ao::uvector< value_t >::crend(), ao::uvector< value_t >::deallocate(), dyscostman::StochasticEncoder< ValueType >::Dictionary::lower_bound_slow(), and ao::uvector< value_t >::rend().
|
inlinenoexcept |
|
inlinenoexcept |
Get the number of elements the container can currently hold without reallocating storage.
Definition at line 353 of file uvector.h.
Referenced by ao::uvector< value_t >::assign(), ao::uvector< value_t >::assign_copy_from(), ao::uvector< value_t >::assign_from_range(), dyscostman::StochasticEncoder< ValueType >::Dictionary::capacity(), ao::uvector< value_t >::deallocate(), ao::uvector< value_t >::insert(), ao::uvector< value_t >::insert_from_range(), ao::uvector< value_t >::insert_uninitialized(), ao::uvector< value_t >::push_back(), ao::uvector< value_t >::push_back_range(), ao::uvector< value_t >::reserve(), ao::uvector< value_t >::resize(), and ao::uvector< value_t >::shrink_to_fit().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineprivate |
Definition at line 974 of file uvector.h.
Referenced by ao::uvector< value_t >::at().
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineprivatenoexcept |
Definition at line 844 of file uvector.h.
Referenced by ao::uvector< value_t >::assign(), ao::uvector< value_t >::assign_copy_from(), ao::uvector< value_t >::assign_from_range(), ao::uvector< value_t >::assign_move_from(), ao::uvector< value_t >::deallocate(), ao::uvector< value_t >::enlarge(), ao::uvector< value_t >::enlarge_for_insert(), ao::uvector< value_t >::reserve(), ao::uvector< value_t >::resize(), ao::uvector< value_t >::shrink_to_fit(), and ao::uvector< value_t >::~uvector().
|
inlineprivatenoexcept |
|
inline |
Insert an element at a given position by constructing it in place.
All iterators will be invalidated. This operation needs to move all elements after the new element, and can therefore be expensive.
position | Position of the new element. The new element will be added before the old element at that position. |
args | List of arguments to be forwarded to construct the new element. |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
Get iterator to element past last element.
Definition at line 269 of file uvector.h.
Referenced by ao::uvector< value_t >::crbegin(), dyscostman::StochasticEncoder< ValueType >::Dictionary::end(), and ao::uvector< value_t >::rbegin().
|
inlinenoexcept |
|
inlineprivate |
Definition at line 985 of file uvector.h.
Referenced by ao::uvector< value_t >::emplace_back(), ao::uvector< value_t >::push_back(), and ao::uvector< value_t >::push_back_range().
|
inlineprivate |
Definition at line 995 of file uvector.h.
Referenced by ao::uvector< value_t >::emplace(), ao::uvector< value_t >::insert(), ao::uvector< value_t >::insert_from_range(), and ao::uvector< value_t >::insert_uninitialized().
|
inlineprivatenoexcept |
Definition at line 980 of file uvector.h.
Referenced by ao::uvector< value_t >::emplace(), ao::uvector< value_t >::emplace_back(), ao::uvector< value_t >::insert(), ao::uvector< value_t >::insert_from_range(), ao::uvector< value_t >::insert_uninitialized(), ao::uvector< value_t >::push_back(), ao::uvector< value_t >::push_back_range(), and ao::uvector< value_t >::resize().
|
inline |
|
inline |
Delete a range of elements from the container.
This operation moves all elements past the removed elements, and can therefore be expensive.
first | Position of first element to be removed. |
last | Position past last element to be removed. |
|
inlinenoexcept |
Get reference to first element in container.
Definition at line 433 of file uvector.h.
Referenced by dyscostman::StochasticEncoder< ValueType >::Dictionary::smallest_value().
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Insert an element at a given position.
All iterators will be invalidated. This operation needs to move all elements after the new element, and can therefore be expensive.
position | Position of the new element. The new element will be added before the old element at that position. |
item | Value of the new item. |
|
inline |
Insert elements at a given position and initialize them with a value.
All iterators will be invalidated. This operation needs to move all elements after the new element, and can therefore be expensive.
position | Position of the new elements. The new elements will be added before the old element at that position. |
n | Number of elements to add. |
val | Value of the new item. |
|
inline |
Insert elements at a given position and initialize them from a range.
All iterators will be invalidated. This operation needs to move all elements after the new element, and can therefore be expensive.
position | Position of the new elements. The new elements will be added before the old element at that position. |
first | Iterator to the beginning of the range. |
last | Iterator past the end of the range. |
|
inline |
Insert an element at a given position by moving it in.
All iterators will be invalidated. This operation needs to move all elements after the new element, and can therefore be expensive.
Note that this container can only hold simple types that do not perform allocations. Therefore, there is probably no benefit in moving the new item in over copying it in with insert(const_iterator, const Tp&).
position | Position of the new element. The new element will be added before the old element at that position. |
item | Value of the new item. |
|
inline |
Insert elements at a given position and initialize them from a initializer list.
All iterators will be invalidated. This operation needs to move all elements after the new element, and can therefore be expensive.
position | Position of the new elements. The new elements will be added before the old element at that position. |
initlist | List of items to insert. |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
— NON STANDARD METHODS —
Insert elements at a given position without initializing them.
All iterators will be invalidated. This operation needs to move all elements after the new element, and can therefore be expensive. It will not initialize the new elements, and is therefore faster than insert(const_iterator, size_t, const Tp&).
This method is non-standard: it is not present in std::vector.
position | Position of the new elements. The new elements will be added before the old element at that position. |
n | Number of elements to add. |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
Add the given value to the end of the container by moving it in.
Iterators are invalidated.
Note that this container can only hold simple types that do not perform allocations. Therefore, there is probably no benefit in moving the new item in over copying it in with push_back(const Tp&).
item | Value of new element. |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Reserve space for a number of elements, to prevent the overhead of extra reallocations.
This has no effect on the working of the uvector, except that it might change the current capacity. This can enhance performance when a large number of elements are added, and an approximate size is known a priori.
This method might cause a reallocation, causing iterators to be invalidated.
n | Number of elements to reserve space for. |
Definition at line 368 of file uvector.h.
Referenced by dyscostman::StochasticEncoder< ValueType >::Dictionary::reserve().
|
inline |
Change the number of elements in the container.
If the new size is larger than the current size, new values will be left uninitialized. Therefore, it is more efficient than resize(size_t)
in std::vector
, as well as resize(size_t, const Tp&). If the new size is smaller than the current size, the container will be truncated and elements past the new size will be removed. No destructor of the removed elements will be called.
n | The new size of the container. |
Definition at line 313 of file uvector.h.
Referenced by ao::uvector< value_t >::push_back_uninitialized(), and dyscostman::StochasticEncoder< ValueType >::Dictionary::resize().
|
inline |
Change the number of elements in the container.
If the new size is larger than the current size, new values will be initialized by the given value. If the new size is smaller than the current size, the container will be truncated and elements past the new size will be removed. No destructor of the removed elements will be called.
n | The new size of the container. |
val | New value of elements that get added to the container. |
|
inline |
Change the capacity of the container such that no extra space is hold.
This has no effect on the working of the uvector, except that it might change the current capacity. This can reduce the current memory usage of the container.
This method might cause a reallocation, causing iterators to be invalidated.
|
inlinenoexcept |
Get number of elements in container.
Definition at line 299 of file uvector.h.
Referenced by ao::uvector< value_t >::assign_copy_from(), ao::uvector< value_t >::check_bounds(), ao::uvector< value_t >::enlarge(), ao::uvector< value_t >::enlarge_for_insert(), ao::uvector< value_t >::enlarge_size(), ao::uvector< value_t >::insert(), ao::uvector< value_t >::insert_from_range(), ao::uvector< value_t >::insert_uninitialized(), dyscostman::StochasticEncoder< ValueType >::Dictionary::largest_symbol(), dyscostman::StochasticEncoder< ValueType >::Dictionary::lower_bound(), dyscostman::StochasticEncoder< ValueType >::Dictionary::lower_bound_fast(), dyscostman::StochasticEncoder< ValueType >::Dictionary::lower_bound_slow(), ao::uvector< value_t >::push_back(), ao::uvector< value_t >::push_back_range(), ao::uvector< value_t >::push_back_uninitialized(), ao::uvector< value_t >::reserve(), ao::uvector< value_t >::resize(), ao::uvector< value_t >::shrink_to_fit(), and dyscostman::StochasticEncoder< ValueType >::Dictionary::size().
|
inlinenoexcept |
Swap the contents of this uvector with the given uvector.
Iterators to both vectors will remain valid and will point into to the swapped container afterwards. This function will never reallocate space.
The allocator will be swapped when the propagate_on_container_swap
of the respective allocator_trait
is true_type
. Its behaviour is undefined when the allocators do not compare equal and propagate_on_container_swap
is false.
other | Other uvector whose contents it to be swapped with this. |
Definition at line 695 of file uvector.h.
Referenced by ao::uvector< value_t >::swap(), and ao::swap().
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
implementation of swap without propagate_on_container_swap
We have two choices here:
The standard says: "Allocator replacement is performed by copy assignment, move assignment, or swapping of the allocator only if allocator_traits<allocatortype>:: propagate_on_container_copy_assignment::value, allocator_traits<allocatortype>::propagate_on_container_move_assignment::value, or allocator_traits<allocatortype>::propagate_on_container_swap::value is true within the implementation of the corresponding container operation. The behavior of a call to a container’s swap function is undefined unless the objects being swapped have allocators that compare equal or allocator_traits<allocatortype>::propagate_on_container_swap::value is true."
|
private |
Definition at line 111 of file uvector.h.
Referenced by ao::uvector< value_t >::assign(), ao::uvector< value_t >::assign_copy_from(), ao::uvector< value_t >::assign_from_range(), ao::uvector< value_t >::assign_move_from(), ao::uvector< value_t >::at(), ao::uvector< value_t >::begin(), ao::uvector< value_t >::capacity(), ao::uvector< value_t >::cbegin(), ao::uvector< value_t >::clear(), ao::uvector< value_t >::construct_from_range(), ao::uvector< value_t >::data(), ao::uvector< value_t >::deallocate(), ao::uvector< value_t >::emplace(), ao::uvector< value_t >::empty(), ao::uvector< value_t >::enlarge(), ao::uvector< value_t >::enlarge_for_insert(), ao::uvector< value_t >::front(), ao::uvector< value_t >::insert(), ao::uvector< value_t >::insert_from_range(), ao::uvector< value_t >::insert_uninitialized(), ao::uvector< value_t >::operator[](), ao::uvector< value_t >::reserve(), ao::uvector< value_t >::resize(), ao::uvector< value_t >::shrink_to_fit(), ao::uvector< value_t >::size(), ao::uvector< value_t >::swap(), and ao::uvector< value_t >::uvector().
|
private |
Definition at line 111 of file uvector.h.
Referenced by ao::uvector< value_t >::assign(), ao::uvector< value_t >::assign_copy_from(), ao::uvector< value_t >::assign_from_range(), ao::uvector< value_t >::assign_move_from(), ao::uvector< value_t >::back(), ao::uvector< value_t >::cend(), ao::uvector< value_t >::clear(), ao::uvector< value_t >::construct_from_range(), ao::uvector< value_t >::emplace(), ao::uvector< value_t >::emplace_back(), ao::uvector< value_t >::empty(), ao::uvector< value_t >::end(), ao::uvector< value_t >::enlarge(), ao::uvector< value_t >::enlarge_for_insert(), ao::uvector< value_t >::erase(), ao::uvector< value_t >::insert(), ao::uvector< value_t >::insert_from_range(), ao::uvector< value_t >::insert_uninitialized(), ao::uvector< value_t >::pop_back(), ao::uvector< value_t >::push_back(), ao::uvector< value_t >::push_back_range(), ao::uvector< value_t >::reserve(), ao::uvector< value_t >::resize(), ao::uvector< value_t >::shrink_to_fit(), ao::uvector< value_t >::size(), ao::uvector< value_t >::swap(), and ao::uvector< value_t >::uvector().
|
private |
Definition at line 111 of file uvector.h.
Referenced by ao::uvector< value_t >::assign(), ao::uvector< value_t >::assign_copy_from(), ao::uvector< value_t >::assign_from_range(), ao::uvector< value_t >::assign_move_from(), ao::uvector< value_t >::capacity(), ao::uvector< value_t >::construct_from_range(), ao::uvector< value_t >::emplace(), ao::uvector< value_t >::emplace_back(), ao::uvector< value_t >::enlarge(), ao::uvector< value_t >::enlarge_for_insert(), ao::uvector< value_t >::insert(), ao::uvector< value_t >::push_back(), ao::uvector< value_t >::reserve(), ao::uvector< value_t >::resize(), ao::uvector< value_t >::shrink_to_fit(), and ao::uvector< value_t >::swap().