bsl::allocator::allocator

Create an allocator sharing the mechanism of the specified original.

Synopsis

Declared in <bslma_bslallocator.h>

template<class ANY_TYPE>
allocator(allocator<ANY_TYPE> const& original) noexcept;

Description

Create an allocator sharing the same mechanism object as the specified original. The newly constructed allocator will compare equal to original, even though they may be instantiated on different types. Postconditions: ` *this == original this->mechanism() == original.mechanism() `

Parameters

NameDescription
originalallocator whose mechanism is shared