Create and return a ManagedPtr using a class-type allocator.
Declared in <bslma_managedptr.h>
template<
class ELEMENT_TYPE,
class ALLOCATOR,
class... ARGS>
static
ManagedPtr<ELEMENT_TYPE>
allocateManaged(
ALLOCATOR const& allocator,
ARGS&&... args)
requires bsl::is_class<ALLOCATOR>::value;
Same as the overload taking bslma::Allocator *, but accepts a class-type allocator.
ManagedPtr managing the newly created ELEMENT_TYPE object
| Name | Description |
|---|---|
| allocator | class-type allocator used to supply memory |
| args | arguments forwarded to the ELEMENT_TYPE constructor |