Creates an inlined vector by moving in the contents of other without allocating. If other contains allocated memory, the newly‐created inlined vector will take ownership of that memory. However, if other does not contain allocated memory, the newly‐created inlined vector will perform element‐wise move construction of the contents of other.
Synopsis
Declared in <absl/container/inlined_vector.h>
InlinedVector(InlinedVector&& other) noexcept(/* see-below */);
Description
NOTE: since no allocation is performed for the inlined vector in either case, the noexcept(...) specification depends on whether moving the underlying objects can throw. It is assumed assumed that... a) move constructors should only throw due to allocation failure. b) if value_type's move constructor allocates, it uses the same allocation function as the inlined vector's allocator. Thus, the move constructor is non‐throwing if the allocator is non‐throwing or value_type's move constructor is specified as noexcept.
Exception specification
This function is potentially-throwing unless absl::allocator_is_nothrow<allocator_type>::value || std::is_nothrow_move_constructible_v<value_type>.
Parameters
Name |
Description |
other |
The inlined vector to move from. |
Created with MrDocs