bsl::multimap::multimap

Create a multimap by moving from original using basicAllocator.

Synopsis

Declared in <bslstl_multimap.h>

multimap(
    BloombergLP::bslmf::MovableRef<multimap> original,
    ALLOCATOR const& basicAllocator);

Description

Create a multimap having the same value as the specified original object that uses the specified basicAllocator to supply memory. The contents of original are moved (in constant time) to the new multimap if basicAllocator == original.get_allocator(), and are move-inserted (in linear time) using basicAllocator otherwise. original is left in a valid but unspecified state. Use a copy of original.key_comp() to order the key-value pairs contained in this multimap. This method requires that the (template parameter) types KEY and VALUE both be move-insertable into this multimap (see {Requirements on KEY and VALUE}). Note that a 'bslma::Allocator *` can be supplied for basicAllocator' if the (template parameter) ALLOCATOR` is bsl::allocator (the default).

Parameters

NameDescription
originalmultimap to move from
basicAllocatorallocator used to supply memory