24 Containers library [containers]

24.5 Unordered associative containers [unord]

24.5.6 Class template unordered_set [unord.set]

24.5.6.4 Modifiers [unord.set.modifiers]

template<class K> pair<iterator, bool> insert(K&& obj); template<class K> iterator insert(const_iterator hint, K&& obj);
Constraints: The qualified-ids Hash​::​is_transparent and Pred​::​is_transparent are valid and denote types.
For the second overload, is_convertible_v<K&&, const_iterator> and is_convertible_v<K&&, iterator> are both false.
Preconditions: value_type is Cpp17EmplaceConstructible into unordered_set from std​::​forward<K>
(obj)
.
Effects: If the set already contains an element that is equivalent to obj, there is no effect.
Otherwise, let h be hash_function()(obj).
Constructs an object u of type value_type with std​::​forward<K>(obj).
If hash_function()(u) != h || contains(u) is true, the behavior is undefined.
Inserts u into *this.
Returns: For the first overload, the bool component of the returned pair is true if and only if the insertion took place.
The returned iterator points to the set element that is equivalent to obj.
Complexity: Average case constant, worst case linear.