std::uses_allocator
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Definido en la cabecera <memory>
|
||
| template< class T, class Alloc > struct uses_allocator |
(desde C++11) | |
Si tiene un
T allocator_type miembro typedef que es convertible de Alloc, proporciona el miembro constante value igual a true. De lo contrario value es false .Original:
If
T has a member typedef allocator_type which is convertible from Alloc, provides the member constant value equal to true. Otherwise value is false.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Contenido |
Inherited from std::integral_constant
Member constants
| value [estático] |
true si T uses allocator Alloc, false lo contrario Original: true if T uses allocator Alloc, false otherwise The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público estático constante) |
Member functions
| operator bool |
convierte el objeto a bool, devuelve value Original: converts the object to bool, returns value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) |
Member types
| Tipo
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
value_type
|
bool
|
type
|
std::integral_constant<bool, value> |
[editar] Especializaciones
Especializaciones personalizadas del tipo de rasgo std::uses_allocator están permitidos para los tipos que no tienen la
1) allocator_type typedef miembro pero que cumplan uno de los dos requisitos siguientes:Original:
Custom specializations of the type trait std::uses_allocator are allowed for types that do not have the member typedef
allocator_type but satisfy one of the following two requirements:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
T tiene un constructor que toma std::allocator_arg_t como primer argumento, y Alloc como segundo argumento .Original:
T has a constructor which takes std::allocator_arg_t as the first argument, and Alloc as the second argument.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
T tiene un constructor que toma Alloc como último argumento .Original:
T has a constructor which takes Alloc as the last argument.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Los siguientes especialidades vienen dados por la biblioteca estándar:
Original:
The following specializations are already provided by the standard library:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| se especializa el rasgo tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (especialización de plantilla de clase) | |
| se especializa el rasgo tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (plantilla de función) | |
| se especializa el rasgo tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (plantilla de función) | |
| se especializa el rasgo tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (plantilla de función) | |
| se especializa el rasgo tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (especialización de plantilla de clase) | |
| se especializa el rasgo tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (especialización de plantilla de clase) | |
| se especializa el rasgo tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (especialización de plantilla de clase) |
[editar] Notas
Este rasgo tipo es utilizado por std::scoped_allocator_adaptor y puede ser utilizado por los asignadores personalizados para determinar si el objeto en construcción en sí es capaz de utilizar un asignador (por ejemplo, es un contenedor), en cuyo caso debe ser un asignador pasó a su constructor .
Original:
This type trait is used by std::scoped_allocator_adaptor and may be used by custom allocators to determine whether the object being constructed is itself capable of using an allocator (e.g. is a container), in which case an allocator should be passed to its constructor.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ver también
| (C++11) |
un objeto de tipo std::allocator_arg_t utiliza para seleccionar conscientes asignador-constructores Original: an object of type std::allocator_arg_t used to select allocator-aware constructors The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (constante) |
| (C++11) |
tipo de variable utilizada para seleccionar conscientes asignador-sobrecargas del constructor Original: tag type used to select allocator-aware constructor overloads The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase) |
| (C++11) |
implementa varios niveles asignador de niveles múltiples recipientes Original: implements multi-level allocator for multi-level containers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (plantilla de clase) |

