allocate_shared
Creashared_ptr agli oggetti allocati e costruiti per un tipo specifico utilizzando un allocatore specificato.Restituisce shared_ptr.
template<class Type, class Allocator, class... Types>
shared_ptr<Type> allocate_shared(
Allocator _Alloc,
Types&&... _Args
);
Parametri
_Alloc
L'allocatore utilizzato per creare oggetti._Args
Zero o più argomenti che diventano gli oggetti.
Valore proprietà/Valore restituito
Restituisce shared_ptr che punti all'oggetto allocato.
Note
La funzione crea l'oggetto shared_ptr<Type>, un puntatore a Type(_Args...) come allocato e costruito da _Alloc.
Requisiti
intestazione: <memory>
Spazio dei nomi: deviazione standard