Create a map by moving from original using basicAllocator.

Synopsis

Declared in <bdlc_flathashmap.h>

FlatHashMap(
    bslmf::MovableRef<FlatHashMap> original,
    bslma::Allocator* basicAllocator);

Description

Create a FlatHashMap object having the same value, hasher, and equality comparator as the specified original object, using the specified basicAllocator to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The allocator of original remains unchanged. If original and the newly created object have the same allocator then the contents of original are moved (in constant time) to this object, original is left in a (valid) unspecified state, and no exceptions will be thrown; otherwise, original is unchanged (and an exception may be thrown).

Parameters

Name

Description

original

map to move from

basicAllocator

allocator used to supply memory

Created with MrDocs