Return a shared_ptr managing a newly created object.
Synopsis
Declared in <bslstl_sharedptr.h>
template<class ARRAY_TYPE>
bsl::shared_ptr<ARRAY_TYPE>
make_shared(remove_extent<ARRAY_TYPE>::type const& value)
requires is_bounded_array<ARRAY_TYPE>::value;
Description
Return a shared_ptr object referring to and managing a new ARRAY_TYPE object, where ARRAY_TYPE is a bounded array. The default allocator will be used to supply a single contiguous region of memory holding the returned shared pointer's internal representation and the new ARRAY_TYPE object, and each element in the array is constructed from the specified value.
Return Value
shared pointer managing a newly created object
Parameters
Name |
Description |
value |
value used to initialize each array element |
Created with MrDocs