[unord.multimap.cnstr] (original) (raw)

23 Containers library [containers]

23.5 Unordered associative containers [unord]

23.5.4 Class template unordered_multimap [unord.multimap]

23.5.4.2 Constructors [unord.multimap.cnstr]

constexpr unordered_multimap() : unordered_multimap(size_type(_see below_)) { } constexpr explicit unordered_multimap(size_type n, const hasher& hf = hasher(),const key_equal& eql = key_equal(),const allocator_type& a = allocator_type());

Effects: Constructs an empty unordered_multimap using the specified hash function, key equality predicate, and allocator, and using at least n buckets.

For the default constructor, the number of buckets is implementation-defined.

max_load_factor() returns 1.0.

template<class InputIterator> constexpr unordered_multimap(InputIterator f, InputIterator l, size_type n = _see below_, const hasher& hf = hasher(),const key_equal& eql = key_equal(),const allocator_type& a = allocator_type());template<[_container-compatible-range_](container.intro.reqmts#concept:container-compatible-range "23.2.2.1 Introduction [container.intro.reqmts]")<value_type> R> constexpr unordered_multimap(from_range_t, R&& rg, size_type n = _see below_, const hasher& hf = hasher(),const key_equal& eql = key_equal(),const allocator_type& a = allocator_type());constexpr unordered_multimap(initializer_list<value_type> il, size_type n = _see below_, const hasher& hf = hasher(),const key_equal& eql = key_equal(),const allocator_type& a = allocator_type());

Effects: Constructs an empty unordered_multimap using the specified hash function, key equality predicate, and allocator, and using at least n buckets.

If n is not provided, the number of buckets is implementation-defined.

Then inserts elements from the range [f, l), rg, or il, respectively.

max_load_factor() returns 1.0.

Complexity: Average case linear, worst case quadratic.