[ Web Proxy ]
URL:
Viewing: https://fr.cppreference.com/cpp/memory/auto_ptr [Back]  [Original]

std::auto_ptr cppreference.com
cppreference.com
Espaces de noms
Variantes

std::auto_ptr

De cppreference.com

<metanoindex/>

 
 
 
La gestion dynamique de la mmoire
Faible niveau de gestion de la mmoire
Rpartiteurs
Original:
Allocators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
allocator
allocator_traits (C++11)
allocator_arg_t (C++11)
allocator_arg (C++11)
uses_allocator (C++11)
scoped_allocator_adaptor (C++11)
Non initialise stockage
Original:
Uninitialized storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
uninitialized_copy
uninitialized_copy_n (C++11)
uninitialized_fill
uninitialized_fill_n
raw_storage_iterator
get_temporary_buffer
return_temporary_buffer
Pointeurs intelligents
Original:
Smart pointers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unique_ptr (C++11)
shared_ptr (C++11)
weak_ptr (C++11)
auto_ptr (obsolte)
owner_less (C++11)
enable_shared_from_this (C++11)
bad_weak_ptr (C++11)
default_delete (C++11)
Soutien garbage collection
Original:
Garbage collection support
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declare_reachable (C++11)
undeclare_reachable (C++11)
declare_no_pointers (C++11)
undeclare_no_pointers (C++11)
pointer_safety (C++11)
get_pointer_safety (C++11)
Divers
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pointer_traits (C++11)
addressof (C++11)
align (C++11)
Bibliothque C
Original:
C Library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
std::auto_ptr
Les fonctions membres
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
auto_ptr::auto_ptr
auto_ptr::~auto_ptr
auto_ptr::operator=
auto_ptr::operator*
auto_ptr::operator->
auto_ptr::get
auto_ptr::release
auto_ptr::reset
auto_ptr::operator auto_ptr<Y>
 
<tbody> </tbody>
Dclar dans l'en-tte <memory>
template< class T > class auto_ptr;
(1) (obsolte)
template<> class auto_ptr<void>
(2) (obsolte)
auto_ptr est un pointeur intelligent qui gre un objet obtenu par l'intermdiaire nouveau et supprime cet objet quand auto_ptr lui-mme est dtruit. Il peut tre utilis pour fournir une scurit pour les objets exception alloue dynamiquement, pour le passage de la proprit des objets allous dynamiquement en fonction, et pour renvoyer les objets affectation dynamique de fonctions .
Original:
auto_ptr is a smart pointer that manages an object obtained via new and deletes that object when auto_ptr itself is destroyed. It may be used to provide exception safety for dynamically-allocated objects, for passing ownership of dynamically-allocated objects into functions and for returning dynamically-allocated objects from functions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Copie d'une copie auto_ptr le pointeur et transfre la proprit la destination: construction exemplaire la fois et l'affectation copie de auto_ptr modifier leurs arguments de la main droite, et la "copie" n'est pas gal l'original. En raison de ces smantique de la copie inhabituelles, auto_ptr ne peuvent pas tre placs dans des conteneurs standards. std::unique_ptr est prfr pour ceci et d'autres usages .
Original:
Copying an auto_ptr copies the pointer and transfers ownership to the destination: both copy construction and copy assignment of auto_ptr modify their right hand arguments, and the "copy" is not equal to the original. Because of these unusual copy semantics, auto_ptr may not be placed in standard containers. std::unique_ptr is preferred for this and other uses.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

2)

Spcialisation pour void type est fourni, il dclare la element_type typedef, mais pas de fonctions membres .
Original:
Specialization for type void is provided, it declares the typedef element_type, but no member functions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Types de membres

Type du membre Dfinition
element_type T

Fonctions membres

cre un nouveau auto_ptr
Original:
creates a new auto_ptr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
dtruit un auto_ptr et l'objet gr
Original:
destroys an auto_ptr and the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
transfre la proprit d'un autre auto_ptr
Original:
transfers ownership from another auto_ptr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
convertit le pointeur manag un pointeur de type diffrent
Original:
converts the managed pointer to a pointer to different type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
Modificateurs
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dtruit l'objet gr
Original:
destroys the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
libre la proprit de l'objet gr
Original:
releases ownership of the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
Des observateurs
Original:
Observers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
obtient un pointeur vers l'objet gr
Original:
obtains a pointer to the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
accde l'objet gr
Original:
accesses the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)

Web Proxy Viewer  |  New URL  |  Original Page