Type support (basic types, RTTI, type traits)
De cppreference.com
< cpp
[editar] Tipos básicos
[editar] Tipos fundamentales definidos por el lenguaje
[editar] Otros tipos básicos y macros
Defined in header
<cstddef> | |
tipo entero sin signo devuelto por el operador sizeof Original: unsigned integer type returned by the sizeof operator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |
tipo entero con signo de regresar al restar dos punteros Original: signed integer type returned when subtracting two pointers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |
(C++11) |
el tipo de la nullptr literal puntero nulo Original: the type of the null pointer literal nullptr The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) |
definido por la implantación de puntero nulo constante Original: implementation-defined null pointer constant The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (macro constante) | |
(C++11) |
Tipo POD con el requisito de alineación tan grande como cualquier otro tipo escalar Original: POD type with alignment requirement as great as any other scalar type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) |
desplazamiento de bytes desde el comienzo de un tipo estándar de diseño de al miembro especificado Original: byte offset from the beginning of a standard-layout type to specified member The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función macro) | |
Defined in header
<cstdbool> | |
__bool_true_false_are_defined (C++11) |
C compatibilidad constante macro, se expande a 1 constante entera Original: C compatibility macro constant, expands to integer constant 1 The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (macro constante) |
Defined in header
<cstdalign> | |
__alignas_is_defined (C++11) |
C compatibilidad constante macro, se expande a 1 constante entera Original: C compatibility macro constant, expands to integer constant 1 The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (macro constante) |
[editar] Tipos fijos ancho enteros (desde C++11)
[editar] numeric_limits
Defined in header
<limits> | |
proporciona una interfaz para las propiedades de consulta de todos los tipos numéricos fundamentales . Original: provides an interface to query properties of all fundamental numeric types. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
[editar] C numérico limita interfaz
[editar] Identificación de tipo en tiempo de ejecución
contiene algún tipo de información, generada por el implementation. Esta es la clase, devuelto por el operador typeid Original: contains some type's information, generated by the implementation. This is the class, returned by the typeid operator 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) |
envoltura alrededor de un objeto type_info , que se puede utilizar como índice asociativo y no ordenadas en contenedores asociativos Original: wrapper around a type_info object, that can be used as index in associative and unordered associative containers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase) |
Excepción que se produce cuando una discusión en un typeid expresión es nulo Original: exception that is thrown if an argument in a typeid expresión is null The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase) | |
Excepción que se produce por una expresión dynamic_cast válido, es decir, un elenco de tipo de referencia falla Original: exception that is thrown by an invalid dynamic_cast expression, i.e. a cast of reference type fails The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase) |
[editar] Rasgos de tipo NJ
Rasgos de tipo define un tiempo de compilación basado en plantillas de interfaz para consultar o modificar las propiedades de los tipos .
Original:
Type traits defines an compile-time template-based interface to query or modify the properties of types.
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] Propiedades de tipo
Defined in header
<type_traits> | |
Original: Primary type categories The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
Comprueba si un tipo es void Original: checks if a type is void The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es de tipo integral Original: checks if a type is integral type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es tipo de punto flotante Original: checks if a type is floating-point type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es un tipo de matriz Original: checks if a type is an array type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es un tipo de enumeración Original: checks if a type is an enumeration type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es un tipo de unión Original: checks if a type is an union type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
checks if a type is a class type (but not union type) (clase de plantilla) |
(C++11) |
Comprueba si un tipo es un tipo de función Original: checks if a type is a function type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es un tipo de puntero Original: checks if a type is a pointer type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es' lvalue referencia Original: checks if a type is lvalue reference The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
comprueba si un tipo es' rvalue referencia Original: checks if a type is rvalue reference The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es un puntero a un objeto de miembro no estático Original: checks if a type is a pointer to a non-static member object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es un puntero a una función miembro no estática Original: checks if a type is a pointer to a non-static member function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Original: Composite type categories The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
Comprueba si un tipo es el tipo fundamental Original: checks if a type is fundamental type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es de tipo aritmético Original: checks if a type is arithmetic type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es de tipo escalar Original: checks if a type is scalar type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es tipo de objeto Original: checks if a type is object type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es de tipo compuesto Original: checks if a type is compound type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo está bien lvalue referencia o referencia rvalue Original: checks if a type is either lvalue reference or rvalue reference The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
checks if a type is a pointer to a non-static member function or object (clase de plantilla) |
Original: Type properties The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
Comprueba si un tipo es const-calificado Original: checks if a type is const-qualified The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es volátil calificado Original: checks if a type is volatile-qualified The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es trivial Original: checks if a type is trivial The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
checks if a type is trivially copyable (clase de plantilla) |
(C++11) |
comprueba si un tipo es estándar de diseño de tipo Original: checks if a type is standard-layout type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es llano datos antiguos (POD) de tipo Original: checks if a type is plain-old data (POD) type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
checks if a type is literal type (clase de plantilla) |
(C++11) |
checks if a type is class (but not union) type and has no data (clase de plantilla) |
(C++11) |
Comprueba si un tipo es tipo de clase polimórfica Original: checks if a type is polymorphic class type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es el tipo de clase abstracta Original: checks if a type is abstract class type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo se firmaron tipo aritmético Original: checks if a type is signed arithmetic type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo es el tipo de aritmética sin signo Original: checks if a type is unsigned arithmetic type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Original: Supported operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) (C++11) (C++11) |
Comprueba si un tipo tiene un constructor de argumentos concretos Original: checks if a type has a constructor for specific arguments The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Comprueba si un tipo tiene un constructor por defecto Original: checks if a type has a default constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) | |
(C++11) (C++11) (C++11) |
Comprueba si un tipo tiene un constructor de copia Original: checks if a type has a copy constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) (C++11) (C++11) |
Comprueba si un tipo tiene un constructor movimiento Original: checks if a type has a move constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) (C++11) (C++11) |
Comprueba si un tipo tiene un operador de asignación para un argumento específico Original: checks if a type has a assignment operator for a specific argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) (C++11) (C++11) |
Comprueba si un tipo tiene un operador de asignación de copia Original: checks if a type has a copy assignment operator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) (C++11) (C++11) |
Comprueba si un tipo tiene un operador de asignación movimiento Original: checks if a type has a move assignment operator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) (C++11) (C++11) |
Comprueba si un tipo tiene un destructor no eliminado Original: checks if a type has a non-deleted destructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
Comprueba si un tipo tiene un destructor virtual Original: checks if a type has a virtual destructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Original: Property queries The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
obtiene requisitos del tipo de alineación Original: obtains the type's alignment requirements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
obtiene el número de dimensiones de un tipo de matriz Original: obtains the number of dimensions of an array type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
obtiene el tamaño de un tipo de matriz a lo largo de una dimensión especificada Original: obtains the size of an array type along a specified dimension The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Original: Type relationships The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
comprueba si dos tipos son los mismos Original: checks if two types are the same The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
checks if a type is derived from the other type (clase de plantilla) |
(C++11) |
Comprueba si un tipo se puede convertir en el otro tipo Original: checks if a type can be converted to the other type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
[editar] Modificaciones de tipo
Tipo de modificación de las plantillas de crear nuevas definiciones de tipo mediante la aplicación de las modificaciones en un parámetro de plantilla. El tipo resultante se puede acceder a través de miembro de
type
typedef .Original:
Type modification templates create new type definitions by applying modifications on a template parameter. The resulting type can then be accessed through
type
member typedef.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.
Defined in header
<type_traits> | |
Original: Const-volatility specifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) (C++11) (C++11) |
elimina const y / o prescriptores volatile del tipo dado Original: removes const or/and volatile specifiers from the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) (C++11) (C++11) |
adds const or/and volatile specifiers to the given type (clase de plantilla) |
Original: References The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
elimina referencia de un tipo dado Original: removes reference from the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) (C++11) |
añade valor-I' o' rvalue referencia al tipo dado Original: adds lvalue or rvalue reference to the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Original: Pointers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
elimina el puntero del tipo dado Original: removes pointer from the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
agrega puntero al tipo dado Original: adds pointer to the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Original: Sign modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
hace que el tipo dado integral firmado Original: makes the given integral type signed The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
hace que el tipo dado integral sin firmar Original: makes the given integral type unsigned The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Original: Arrays The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
elimina una extensión del tipo de matriz dada Original: removes one extent from the given array type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
removes all extents from the given array type (clase de plantilla) |
[editar] Transformaciones Misceláneos
Defined in header
<type_traits> | |
(C++11) |
lo contrario. define el tipo adecuado para su uso como almacenamiento sin inicializar para tipos de tamaño dado Original: defines the type suitable for use as uninitialized storage for types of given size The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
define el tipo adecuado para su uso como almacenamiento sin inicializar todos los tipos dados Original: defines the type suitable for use as uninitialized storage for all given types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
aplica transformaciones de tipo como cuando pasa un argumento de la función de valor Original: applies type transformations as when passing a function argument by value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
esconde una sobrecarga de la función o especialización plantilla basada en booleana en tiempo de compilación Original: hides a function overload or template specialization based on compile-time boolean The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
escoge un tipo u otro basado en la compilación de tipo booleano Original: chooses one type or another based on compile-type boolean The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
deduces the result type of a mixed-mode arithmetic expression (clase de plantilla) |
(C++11) |
obtiene el tipo subyacente entero para un tipo de enumeración dada Original: obtains the underlying integer type for a given enumeration type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
(C++11) |
deduce el tipo de retorno de una expresión de llamada a la función Original: deduces the return type of a function call expression The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
[editar] Clases de ayuda
Defined in header
<type_traits> | |
(C++11) |
constante de tiempo de compilación del tipo especificado con el valor especificado Original: compile-time constant of specified type with specified value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |
Dos especialidades de std::integral_constant para la bool tipo están disponibles:
Original:
Two specializations of std::integral_constant for the type bool are provided:
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.
Defined in header
<type_traits> | |
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 |
true_type
|
std::integral_constant<bool, true> |
false_type
|
std::integral_constant<bool, false> |