Espacios de nombres
Variantes
Acciones

std::atomic_is_lock_free<std::shared_ptr>, std::atomic_load<std::shared_ptr>, std::atomic_store<std::shared_ptr>, std::atomic_...<std::shared_ptr>

De cppreference.com
< cpp‎ | memory‎ | shared ptr

 
 
Utilidades de la biblioteca
Escriba apoyo (basic types, RTTI, type traits)
Gestión de memoria dinámica
Gestión de errores
Programa de servicios públicos
Funciones variadic
Fecha y hora
Objetos Function
initializer_list(C++11)
bitset
hash(C++11)
Operadores relacionales
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>=
Pares y tuplas
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)
Cambiar, hacia adelante y mover
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)
 
Gestión de memoria dinámica
Bajo la gestión de memoria de nivel
Los asignadores
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)
Inicializar el almacenamiento
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
Punteros inteligentes
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(obsoleto)
owner_less(C++11)
enable_shared_from_this(C++11)
bad_weak_ptr(C++11)
default_delete(C++11)
Garbage soporte colección
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)
Varios
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.
 
std::shared_ptr
Las funciones miembro
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.
shared_ptr::shared_ptr
shared_ptr::~shared_ptr
shared_ptr::operator=
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
shared_ptr::reset
shared_ptr::swap
Los observadores
Original:
Observers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
shared_ptr::get
shared_ptr::operator*
shared_ptr::operator->
shared_ptr::use_count
shared_ptr::unique
shared_ptr::operator bool
shared_ptr::owner_before
Terceros funciones
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::swap
make_shared
allocate_shared
static_pointer_cast
dynamic_pointer_cast
const_pointer_cast
get_deleter
operator==
operator|=
operator<
operator<=
operator>
operator>=
operator<<
atomic_is_lock_free
atomic_load
atomic_load_explicit
atomic_store
atomic_store_explicit
atomic_exchange
atomic_exchange_explicit
atomic_compare_exchange_weak
atomic_compare_exchange_strong
atomic_compare_exchange_weak_explicit
atomic_compare_exchange_strong_explicit
std::hash
 
template< class T >
bool atomic_is_lock_free( const std::shared_ptr<T>* p );
(1) (desde C++11)
template< class T >
std::shared_ptr<T> atomic_load( const std::shared_ptr<T>* p );
(2) (desde C++11)
template< class T >

std::shared_ptr<T> atomic_load_explicit( const shared_ptr<T>* p,

                                         std::memory_order mo );
(3) (desde C++11)
template< class T >

void atomic_store( std::shared_ptr<T>* p,

                   std::shared_ptr<T> r );
(4) (desde C++11)
template< class T >

void atomic_store_explicit( std::shared_ptr<T>* p,
                            shared_ptr<T> r,

                            std::memory_order mo);
(5) (desde C++11)
template< class T >

std::shared_ptr<T> atomic_exchange( std::shared_ptr<T>* p,

                                    std::shared_ptr<T> r);
(6) (desde C++11)
template<class T>

std::shared_ptr<T> atomic_exchange_explicit( std::shared_ptr<T>* p,
                                             std::shared_ptr<T> r,

                                             std::memory_order mo);
(7) (desde C++11)
template< class T >

bool atomic_compare_exchange_weak( std::shared_ptr<T>* p,
                                   std::shared_ptr<T>* expected,

                                   std::shared_ptr<T> desired);
(8) (desde C++11)
template<class T>

bool atomic_compare_exchange_strong( std::shared_ptr<T>* p,
                                     std::shared_ptr<T>* expected,

                                     std::shared_ptr<T> desired);
(9) (desde C++11)
template< class T >

bool atomic_compare_exchange_strong_explicit( std::shared_ptr<T>* p,
                                              std::shared_ptr<T>* expected,
                                              std::shared_ptr<T> desired,
                                              std::memory_order success,

                                              std::memory_order failure);
(10) (desde C++11)
template< class T >

bool atomic_compare_exchange_weak_explicit( std::shared_ptr<T>* p,
                                            std::shared_ptr<T>* expected,
                                            std::shared_ptr<T> desired,
                                            std::memory_order success,

                                            std::memory_order failure);
(11) (desde C++11)
Si múltiples hilos de ejecución acceso al objeto al que hace referencia el std::shared_ptr mismo sin sincronización, una raza de datos puede ocurrir, a menos que todo ese acceso se realiza a través de estas funciones, que son especializaciones parciales de las funciones de acceso atómicos correspondientes (std::atomic_load, std::atomic_store, etc)
Original:
If multiple threads of execution access the object referenced by the same std::shared_ptr without synchronization, a data race may occur, unless all such access is performed through these functions, which are partial specializations of the corresponding atomic access functions (std::atomic_load, std::atomic_store, etc)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
{{{1}}}
Original:
{{{2}}}
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Determina si el acceso atómico al puntero compartido apuntaban a por p es sin bloqueo .
Original:
Determines whether atomic access to the shared pointer pointed-to by p is lock-free.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Equivalente a atomic_load_explicit(p, std::memory_order_seq_cst)
Original:
Equivalent to atomic_load_explicit(p, std::memory_order_seq_cst)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Devuelve el puntero compartido señaló a por p. Al igual que con la std::atomic_load_explicit no especializado, mo no puede ser std::memory_order_release o std::memory_order_acq_rel
Original:
Returns the shared pointer pointed-to by p. As with the non-specialized std::atomic_load_explicit, mo cannot be std::memory_order_release or std::memory_order_acq_rel
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Equivalente a atomic_store_explicit(p, r, memory_order_seq_cst)
Original:
Equivalent to atomic_store_explicit(p, r, memory_order_seq_cst)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
Intercambia los punteros compartidos p y r, efectivamente ejecución p->swap(r). Al igual que con la std::atomic_store_explicit no especializado, mo no puede ser std::memory_order_acquire o std::memory_order_acq_rel
Original:
Swaps the shared pointers p and r, effectively executing p->swap(r). As with the non-specialized std::atomic_store_explicit, mo cannot be std::memory_order_acquire or std::memory_order_acq_rel
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
Equivalente a atomic_exchange_explicit(p, r, memory_order_seq_cst)
Original:
Equivalent to atomic_exchange_explicit(p, r, memory_order_seq_cst)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
7)
Intercambia los punteros compartidos p y r, efectivamente ejecución p->swap(r) y devuelve una copia del puntero compartido anteriormente apuntado a por p
Original:
Swaps the shared pointers p and r, effectively executing p->swap(r) and returns a copy of the shared pointer formerly pointed-to by p
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
8)
Equivalente a atomic_compare_exchange_weak_explicit(p, expected, desired, std::memory_order_seq_cst, std::memory_order_seq_cst)
Original:
Equivalent to atomic_compare_exchange_weak_explicit(p, expected, desired, std::memory_order_seq_cst, std::memory_order_seq_cst)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
9)
Equivalente a atomic_compare_exchange_strong_explicit(p, expected, desired, std::memory_order_seq_cst, std::memory_order_seq_cst)
Original:
Equivalent to atomic_compare_exchange_strong_explicit(p, expected, desired, std::memory_order_seq_cst, std::memory_order_seq_cst)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
10)
Compara los punteros compartidos señaló a por p y expected. Si son equivalentes (propiedad de las acciones del puntero del mismo y se refieren al mismo puntero), asigna desired en *p utilizando la memoria ordenar restricciones especificadas por success y vuelve true. Si no son equivalentes, asigna *p en *expected utilizando la memoria de pedido restricciones especificadas por failure y devuelve false .
Original:
Compares the shared pointers pointed-to by p and expected. If they are equivalent (share ownership of the same pointer and refer to the same pointer), assigns desired into *p using the memory ordering constraints specified by success and returns true. If they are not equivalent, assigns *p into *expected using the memory ordering constraints specified by failure and returns false.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
11)
Igual que el 10), pero puede fallar falsamente .
Original:
Same as 10), but may fail spuriously.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Todas estas funciones invocar un comportamiento indefinido si p es un puntero nulo .
Original:
All these functions invoke undefined behavior if p is a null pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Parámetros

p, expected -
un puntero a una std::shared_ptr
Original:
a pointer to a std::shared_ptr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
r, desired - a std::shared_ptr
mo, success, failure -
memoria ordenar selectores de std::memory_order tipo
Original:
memory ordering selectors of type std::memory_order
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Excepciones

Estas funciones no producen excepciones .
Original:
These functions do not throw exceptions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Retorno

1)
true atómica si el acceso se realiza utilizando bloqueo sin instrucciones
Original:
true if atomic access is implemented using lock-free instructions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
@ 2,3 @ Una copia del puntero apuntado a compartir .
Original:
@2,3@ A copy of the pointed-to shared pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
@ 4,5 @ nada
Original:
@4,5@ nothing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
@ 6,7 @ Una copia del puntero señaló anteriormente a compartir
Original:
@6,7@ A copy of the formerly pointed-to shared pointer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
@ @ 8,9,10,11 true si los punteros compartidos eran equivalentes y el intercambio se realizó, por lo demás false .
Original:
@8,9,10,11@ true if the shared pointers were equivalent and the exchange was performed, false otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ver también

comprueba si las operaciones del tipo atómico son sin bloqueo
Original:
checks if the atomic type's operations are lock-free
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
atómicamente sustituye el valor del objeto atómico con un argumento no atómica
Original:
atomically replaces the value of the atomic object with a non-atomic argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
atómicamente obtiene el valor almacenado en un objeto atómico
Original:
atomically obtains the value stored in an atomic object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
atómicamente reemplaza el valor del objeto atómico con no atómico argumento y devuelve el valor antiguo de la atómica
Original:
atomically replaces the value of the atomic object with non-atomic argument and returns the old value of the atomic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
atómicamente compara el valor del objeto atómica con no atómica argumento y realiza intercambio atómico si carga igual o atómica si no
Original:
atomically compares the value of the atomic object with non-atomic argument and performs atomic exchange if equal or atomic load if not
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]