unordered_map::unordered_map

unordered_map(
    const unordered_map& right);
explicit unordered_map(
   size_type nbuckets = N0,
    const Hash& hfn = Hash(),
    const Pred& comp = Pred(),
    const Alloc& al = Alloc());
template <class InIt>
  unordered_map(
    InIt first, InIt last,
    size_type nbuckets = N0,
    const Hash& hfn = Hash(),
    const Pred& comp = Pred(),
    const Alloc& al = Alloc());

The first constructor specifies a copy of the sequence controlled by right. The second constructor specifies an empty controlled sequence. The third constructor inserts the sequence of element values [first, last).

All constructors also initialize several stored values. For the copy constructor, the values are obtained from right. Otherwise:
  • the minimum number of buckets is the argument nbuckets, if present; otherwise it is a default value described here as the implementation-defined value N0.
  • the hash function object is the argument hfn, if present; otherwise it is Hash().
  • the comparison function object is the argument comp, if present; otherwise it is Pred().
  • the allocator object is the argument al, if present; otherwise, it is Alloc().