Namensräume
Varianten
Aktionen

std::owner_less

Aus cppreference.com
< cpp‎ | memory

 
 
 
Dynamische Speicherverwaltung
Low-Level-Speicherverwaltung
Zuweiser
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)
Initialisierter Speicher
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
Intelligente Zeiger
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(veraltet)
owner_less(C++11)
enable_shared_from_this(C++11)
bad_weak_ptr(C++11)
default_delete(C++11)
Garbage Collection Unterstützung
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)
Verschiedenes
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)
C-Bibliothek
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) (seit C++11)
template< class T >
struct owner_less<std::shared_ptr<T>>;
(2) (seit C++11)
template< class T >
struct owner_less<std::weak_ptr<T>>;
(3) (seit C++11)
Diese Funktion Objekt stellt Eigentümer-basierte Mixed-Typ Bestellbeispiel sowohl std::weak_ptr und std::shared_ptr (wie zur wertorientierten dagegen). Die Reihenfolge ist, so dass zwei Smartpointer gleichwertig nur wenn beide leer ist oder wenn sie beide das gleiche Objekt zu verwalten, selbst wenn die Werte der rohen Zeigern durch get() erhaltenen unterschiedlichen (zB sind, weil sie auf verschiedenen Unterobjekte innerhalb dasselbe Objekt sind, zu vergleichen )
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.
Diese Klasse Vorlage ist die bevorzugte Vergleichsprädikat beim Bau assoziative Container mit std::shared_ptr oder std::weak_ptr als Schlüssel, das heißt,
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>>>.

Der Standardwert operator< kein schwacher Zeiger definiert und kann fälschlicherweise betrachten zwei geteilten Zeigern für dasselbe Objekt antivalenten (siehe 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.

[Bearbeiten] Mitglied Typen

Mitglied Typ
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
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>

[Bearbeiten] Member-Funktionen

vergleicht ihre Argumente mit Besitzer-basierte Semantik
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.

(Funktion)

[Bearbeiten] Siehe auch

erlaubt Sortierung der shared_ptr basierend auf dem Besitz
(öffentliche Elementfunktion of std::shared_ptr) [edit]