Type support (basic types, RTTI, type traits)
Da cppreference.com.
< cpp
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
[modifica] Tipi base
[modifica] Tipi fondamentali definiti dal linguaggio
[modifica] Ulteriori tipi di base e macro
| Defined in header
<cstddef> | |
| senza segno tipo intero restituito dal gestore 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) | |
| firmato tipo intero restituito quando sottraendo due puntatori 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) |
il tipo di puntatore nullo nullptr letterale 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) |
| implementazione definita puntatore nullo costante 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 costante) | |
| (C++11) |
Tipo di POD con il requisito di allineamento così grande come qualsiasi altro scalare 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) |
| byte offset dall'inizio di un layout di tipo standard per membro specificato 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. (funzione macro) | |
| Defined in header
<cstdbool> | |
| __bool_true_false_are_defined (C++11) |
C compatibilità costante macro, si espande per intero 1 costante 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 costante) |
| Defined in header
<cstdalign> | |
| __alignas_is_defined (C++11) |
C compatibilità costante macro, si espande per intero 1 costante 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 costante) |
[modifica] Larghezza fissa interi tipi (dal C++11)
[modifica] numeric_limits
| Defined in header
<limits> | |
| fornisce un'interfaccia per le proprietà delle query di tutti i tipi numerici fondamentali . 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. (classe template) | |
[modifica] C numerico limita interfaccia
[modifica] Identificazione del tipo di runtime
| contiene informazioni di qualche tipo, generato dal implementation. Questa è la classe, restituito dall'operatore 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. (classe) | |
| (C++11) |
wrapper per un oggetto type_info, che può essere utilizzata come indice associativo e non ordinati in contenitori associativi 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. (classe) |
| Eccezione generata se un argomento in un espressione typeid è nullo Original: exception that is thrown if an argument in a espressione typeid is null The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe) | |
| Eccezione generata da un'espressione dynamic_cast valido, vale a dire un cast di tipo di riferimento non riesce 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. (classe) | |
[modifica] Tratti di tipo NJ
Tratti di tipo definisce un tempo di compilazione modello di interfaccia basata su una query o modificare le proprietà dei tipi.
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.
[modifica] Proprietà del 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) |
Verifica se un tipo è 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. (classe template) |
| (C++11) |
controlla se un tipo è di tipo integrale 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. (classe template) |
| (C++11) |
Verifica se un tipo è tipo a virgola mobile 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. (classe template) |
| (C++11) |
Verifica se un tipo è un tipo di matrice 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. (classe template) |
| (C++11) |
Verifica se un tipo è un tipo di enumerazione 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. (classe template) |
| (C++11) |
Verifica se un tipo è un tipo di unione 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. (classe template) |
| (C++11) |
checks if a type is a class type (but not union type) (classe template) |
| (C++11) |
Verifica se un tipo è un tipo di funzione 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. (classe template) |
| (C++11) |
Verifica se un tipo è un tipo di puntatore 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. (classe template) |
| (C++11) |
controlla se un tipo è' lvalue riferimento 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. (classe template) |
| (C++11) |
controlla se un tipo è' rvalue riferimento 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. (classe template) |
| (C++11) |
Verifica se un tipo è un puntatore ad una non statico oggetto membro 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. (classe template) |
| (C++11) |
Verifica se un tipo è un puntatore ad una funzione non statica membro 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. (classe template) |
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) |
Verifica se un tipo è di tipo fondamentale 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. (classe template) |
| (C++11) |
Verifica se un tipo è di tipo aritmetico 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. (classe template) |
| (C++11) |
Verifica se un tipo è di tipo scalare 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. (classe template) |
| (C++11) |
Verifica se un tipo è tipo di oggetto 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. (classe template) |
| (C++11) |
controlla se un tipo è di tipo composto 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. (classe template) |
| (C++11) |
Verifica se un tipo è o lvalue riferimento o di riferimento 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. (classe template) |
| (C++11) |
checks if a type is a pointer to a non-static member function or object (classe template) |
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) |
controlla se è un tipo const qualificati 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. (classe template) |
| (C++11) |
controlla se è un tipo di volatili qualificato 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. (classe template) |
| (C++11) |
Verifica se un tipo è banale 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. (classe template) |
| (C++11) |
checks if a type is trivially copyable (classe template) |
| (C++11) |
controlla se è un tipo standard di layout 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. (classe template) |
| (C++11) |
controlla se è un tipo semplice i dati vecchi (POD) di 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. (classe template) |
| (C++11) |
checks if a type is literal type (classe template) |
| (C++11) |
checks if a type is class (but not union) type and has no data (classe template) |
| (C++11) |
Verifica se un tipo è di tipo classe polimorfica 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. (classe template) |
| (C++11) |
Verifica se un tipo è di tipo classe astratta 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. (classe template) |
| (C++11) |
controlla se un tipo è firmato tipo aritmetico 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. (classe template) |
| (C++11) |
Verifica se un tipo è di tipo aritmetico senza segno 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. (classe template) |
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) |
Verifica se un tipo ha un costruttore per argomenti specifici 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. (classe template) |
| Verifica se un tipo ha un costruttore di default 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. (classe template) | |
| (C++11) (C++11) (C++11) |
Verifica se un tipo ha un costruttore di 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. (classe template) |
| (C++11) (C++11) (C++11) |
Verifica se un tipo ha un costruttore mossa 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. (classe template) |
| (C++11) (C++11) (C++11) |
Verifica se un tipo ha un operatore di assegnazione per un argomento specifico 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. (classe template) |
| (C++11) (C++11) (C++11) |
Verifica se un tipo ha un operatore di assegnamento per 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. (classe template) |
| (C++11) (C++11) (C++11) |
Verifica se un tipo ha un operatore di assegnamento mossa 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. (classe template) |
| (C++11) (C++11) (C++11) |
Verifica se un tipo ha un distruttore non cancellato 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. (classe template) |
| (C++11) |
Verifica se un tipo ha un distruttore virtuale 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. (classe template) |
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) |
ottiene requisiti di allineamento del tipo 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. (classe template) |
| (C++11) |
ottiene il numero di dimensioni di un tipo di matrice 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. (classe template) |
| (C++11) |
ottiene la dimensione di un tipo di matrice lungo una dimensione specificata 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. (classe template) |
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) |
controlla se due tipi sono uguali 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. (classe template) |
| (C++11) |
checks if a type is derived from the other type (classe template) |
| (C++11) |
controlla se un tipo può essere convertito in un altro 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. (classe template) |
[modifica] Tipo modifiche
Modelli di modifica digitare creare nuove definizioni di tipo applicando modifiche su un parametro di template. Il tipo risultante può essere letta attraverso l'elemento
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) |
rimuove const e / o identificatori di volatile dal tipo di dato 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. (classe template) |
| (C++11) (C++11) (C++11) |
adds const or/and volatile specifiers to the given type (classe template) |
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) |
rimuove riferimento dal tipo di dato 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. (classe template) |
| (C++11) (C++11) |
aggiunge lvalue' o' rvalue riferimento al tipo di dato 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. (classe template) |
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) |
rimuove puntatore dal tipo specificato 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. (classe template) |
| (C++11) |
aggiunge puntatore al tipo di dato 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. (classe template) |
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) |
rende il dato tipo integrale firmato 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. (classe template) |
| (C++11) |
rende il dato tipo integrale senza segno 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. (classe template) |
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) |
rimuove una misura dal tipo di matrice specificato 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. (classe template) |
| (C++11) |
removes all extents from the given array type (classe template) |
[modifica] Trasformazioni varie
| Defined in header
<type_traits> | |
| (C++11) |
definisce il tipo idoneo all'uso come memoria non inizializzato per tipi di dimensione data 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. (classe template) |
| (C++11) |
definisce il tipo adatto per l'uso come memoria non inizializzata per tutti i tipi di dati 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. (classe template) |
| (C++11) |
applica trasformazioni di tipo come quando si passa un argomento di funzione per valore 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. (classe template) |
| (C++11) |
nasconde un sovraccarico di funzione o modello di specializzazione basato su in fase di compilazione booleano 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. (classe template) |
| (C++11) |
sceglie un tipo o di un altro sulla base di compilazione di 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. (classe template) |
| (C++11) |
deduces the result type of a mixed-mode arithmetic expression (classe template) |
| (C++11) |
ottiene il tipo sottostante intero per un determinato tipo di enumerazione 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. (classe template) |
| (C++11) |
deduce il tipo restituito di un'espressione chiamata di funzione 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. (classe template) |
[modifica] Helper classi
| Defined in header
<type_traits> | |
| (C++11) |
compilazione costante di tempo del tipo specificato con il valore specificato 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. (classe template) |
Due specializzazioni std::integral_constant per il bool tipo sono previsti:
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> |