Espaces de noms
Variantes
Affichages
Actions

std::owner_less

De cppreference.com
< cpp‎ | memory

 
 
 
La gestion dynamique de la mémoire
Faible niveau de gestion de la mémoire
Répartiteurs
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 initialisée 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 (obsolète)
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)
Bibliothèque 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.
 
Defined in header <memory>
template< class T >
struct owner_less; /* undefined */
(1) (depuis C++11)
template< class T >
struct owner_less<std::shared_ptr<T>>;
(2) (depuis C++11)
template< class T >
struct owner_less<std::weak_ptr<T>>;
(3) (depuis C++11)
Cet objet fonction fournit propriétaire (par opposition à la valeur) de type mixte commander à la fois std::weak_ptr et std::shared_ptr. L'ordre est telle que deux pointeurs intelligents comparer équivalent que si elles sont vides ou si elles gèrent tous deux le même objet, même si les valeurs des pointeurs brutes obtenues par get() sont différents (par exemple, parce qu'ils renvoient à des sous-objets différents au sein du même objet )
Original:
This function object provides owner-based (as opposed to value-based) mixed-type ordering of both std::weak_ptr and std::shared_ptr. The order is such that two smart pointers compare equivalent only if they are both empty or if they both manage the same object, even if the values of the raw pointers obtained by get() are different (e.g. because they point at different subobjects within the same object)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ce modèle de classe est le prédicat de comparaison lors de la construction préférée des conteneurs associatifs ou avec std::shared_ptr std::weak_ptr en tant que clés, c'est-à-
Original:
This class template is the preferred comparison predicate when building associative containers with std::shared_ptr or std::weak_ptr as keys, that is,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

std::map<std::shared_ptr<T>, U, std::owner_less<std::shared_ptr<T>>>

or

std::map<std::weak_ptr<T>, U, std::owner_less<std::weak_ptr<T>>>.

Le operator< défaut n'est pas définie pour les pointeurs faibles, et peut considèrent à tort deux pointeurs partagés pour le même objet non-équivalent (voir shared_ptr::owner_before)
Original:
The default operator< is not defined for weak pointers, and may wrongly consider two shared pointers for the same object non-equivalent (see shared_ptr::owner_before)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Types de membres

Type du membre Définition
result_type bool
first_argument_type 1) T
2) std::shared_ptr<T>
3) std::weak_ptr<T>
second_argument_type 1) T
2) std::shared_ptr<T>
3) std::weak_ptr<T>

[modifier] Fonctions membres

compare ses arguments en utilisant propriétaire fondés sur la sémantique
Original:
compares its arguments using owner-based semantics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction)

[modifier] Voir aussi

fournit propriétaire-fondé l'ordre des pointeurs partagés
Original:
provides owner-based ordering of shared pointers
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 de std::shared_ptr) [edit]