Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

make_shared (<memory>)

Creates and returns a shared_ptr that points to the allocated objects constructed from zero or more arguments using the default allocator.

template<class Type, class... Types>
    shared_ptr<Type> make_shared(
        Types&&... _Args
    );

Parameter

Description

_Args

Allocated objects for which a shared_ptr is to be created.

Returns a shared_ptr that points to the allocated objects.

The function creates the object shared_ptr<Type>, a pointer to Type(_Args...) as allocated and constructed by the default allocator allocator().

Header: <memory>

Namespace: std

Community Additions

Show:
© 2017 Microsoft