Namespace
Varianti

std::owner_less

Da cppreference.com.
< cpp‎ | memory

 
 
Utilità libreria
Tipo di supporto (basic types, RTTI, type traits)
Gestione della memoria dinamica
La gestione degli errori
Programma di utilità
Funzioni variadic
Data e ora
Funzione oggetti
initializer_list(C++11)
bitset
hash(C++11)
Gli operatori relazionali
Original:
Relational operators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
Coppie e tuple
Original:
Pairs and tuples
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pair
tuple(C++11)
piecewise_construct_t(C++11)
piecewise_construct(C++11)
Swap, in avanti e spostare
Original:
Swap, forward and move
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap
forward(C++11)
move(C++11)
move_if_noexcept(C++11)
declval(C++11)
 
Gestione della memoria dinamica
Basso livello di gestione della memoria
Allocatori
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 inizializzata stoccaggio
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
Puntatori intelligenti
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(deprecato)
owner_less(C++11)
enable_shared_from_this(C++11)
bad_weak_ptr(C++11)
default_delete(C++11)
Garbage collection supporto
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)
Varie
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 Library
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.
 
Elemento definito nell'header <memory>
template< class T >
struct owner_less; /* undefined */
(1) (dal C++11)
template< class T >
struct owner_less<std::shared_ptr<T>>;
(2) (dal C++11)
template< class T >
struct owner_less<std::weak_ptr<T>>;
(3) (dal C++11)
Questo oggetto funzione fornisce proprietario-based (in alternativa al fair-based) di tipo misto ordinamento sia std::weak_ptr e std::shared_ptr. L'ordine è tale che due puntatori intelligenti confronta equivalente solo se sono entrambi vuoti o se entrambi gestire l'oggetto stesso, anche se i valori dei puntatori prime ottenuta con get() sono diversi (ad esempio perché puntare sottooggetti diverse all'interno dello stesso oggetto )
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.
Questo modello di classe è il predicato di confronto preferito durante la creazione di contenitori associativi con std::shared_ptr o std::weak_ptr come chiavi, cioè,
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>>>.

Il operator< predefinito non è definito per i puntatori deboli, e può erroneamente considerare due indicatori condivisi per lo stesso oggetto non equivalente (vedi 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.

[modifica] Membri tipi

Membro tipo
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>

[modifica] Membri funzioni

mette a confronto i suoi argomenti con proprietario a base semantica
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.

(funzione)

[modifica] Vedi anche

fornisce proprietario a base di ordinazione di puntatori condivisi
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.

(metodo pubblico) [modifica]