[hive.modifiers] (original) (raw)
23 Containers library [containers]
23.3 Sequence containers [sequences]
23.3.9 Class template hive [hive]
23.3.9.4 Modifiers [hive.modifiers]
template<class... Args> iterator emplace(Args&&... args);template<class... Args> iterator emplace_hint(const_iterator hint, Args&&... args);
Preconditions: T is Cpp17EmplaceConstructible into hive from args.
Effects: Inserts an object of type Tconstructed with std::forward<Args>(args)....
The hint parameter is ignored.
If an exception is thrown, there are no effects.
[Note 1:
args can directly or indirectly refer to a value in *this.
— _end note_]
Returns: An iterator that points to the new element.
Complexity: Constant.
Exactly one object of type T is constructed.
Remarks: Invalidates the past-the-end iterator.
iterator insert(const T& x); iterator insert(const_iterator hint, const T& x); iterator insert(T&& x); iterator insert(const_iterator hint, T&& x);
Effects: Equivalent to: return emplace(std::forward<decltype(x)>(x));
[Note 2:
The hint parameter is ignored.
— _end note_]
Preconditions: T is Cpp17EmplaceInsertable into hivefrom *ranges::begin(rg).
rg and *this do not overlap.
Effects: Inserts copies of elements in rg.
Each iterator in the range rg is dereferenced exactly once.
Complexity: Linear in the number of elements inserted.
Exactly one object of type T is constructed for each element inserted.
Remarks: If an element is inserted, invalidates the past-the-end iterator.
void insert(size_type n, const T& x);
Preconditions: T is Cpp17CopyInsertable into hive.
Effects: Inserts n copies of x.
Complexity: Linear in n.
Exactly one object of type T is constructed for each element inserted.
Remarks: If an element is inserted, invalidates the past-the-end iterator.
template<class InputIterator> void insert(InputIterator first, InputIterator last);
Effects: Equivalent to insert_range(ranges::subrange(first, last)).
iterator erase(const_iterator position); iterator erase(const_iterator first, const_iterator last);
Complexity: Linear in the number of elements erased.
Additionally, if any active blocks become empty of elements as a result of the function call, at worst linear in the number of element blocks.
Remarks: Invalidates references, pointers and iterators referring to the erased elements.
An erase operation that erases the last element in *thisalso invalidates the past-the-end iterator.
void swap(hive& x) noexcept(allocator_traits<Allocator>::propagate_on_container_swap::value || allocator_traits<Allocator>::is_always_equal::value);
Effects: Exchanges the contents, capacity(), and _current-limits_of *this with that of x.