Namespace
Varianti

attribute specifier sequence(dal C++11)

Da cppreference.com.
< cpp‎ | language

 
 
Linguaggio C + +
Temi generali
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Controllo del flusso
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Dichiarazioni esecuzione condizionale
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterazione dichiarazioni
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Vai dichiarazioni
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dichiarazione di funzione
lambda funzione dichiarazione
funzione di modello
specificatore inline
eccezioni specifiche (deprecato)
noexcept specificatore (C++11)
Eccezioni
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Spazi dei nomi
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipi
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
Specifiers
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv specificatori
Durata di stoccaggio specificatori
constexpr specificatore (C++11)
specificatore auto (C++11)
alignas specificatore (C++11)
Inizializzazione
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Letterali
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Espressioni
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rappresentazioni alternative
Utilities
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipi
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
Tipo alias dichiarazione (C++11)
attributi (C++11)
Lancia
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversioni implicite
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Fusione C-stile e funzionale
Occupazione della memoria
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classi
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Specifiche per una classe di funzioni proprietà
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
esplicito (C++11)
statico
Funzioni membro speciali
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modelli
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
classe template
funzione di modello
modello di specializzazione
parametri confezioni (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.
Montaggio in linea
 
Introduce attuazione attributi definiti per i tipi, oggetti, codici, ecc
Original:
Introduces implementation-defined attributes for types, objects, code, etc.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[[attr]] [[attr1, attr2, attr3(args)]] [[namespace::attr(args)]] alignas_specifier

[modifica] Spiegazione

Gli attributi forniscono la sintassi standard unificato per l'attuazione definite le estensioni del linguaggio, come la GNU e le estensioni del linguaggio IBM __attribute__((...)), estensione Microsoft __declspec(), ecc
Original:
Attributes provide the unified standard syntax for implementation-defined language extensions, such as the GNU and IBM language extensions __attribute__((...)), Microsoft extension __declspec(), etc.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Un attributo può essere utilizzato in quasi tutto il programma C + +, e può essere applicato a quasi tutto: ai tipi, alle variabili, alle funzioni, ai nomi, ai blocchi di codice, per unità di traduzione intere, anche se ogni particolare attributo è valido solo qualora è consentita dalla implementazione: [[probably(true)]] può essere utilizzato solo con un if, e non con una dichiarazione di classe. [[omp::parallel()]] può applicare a un blocco di codice o di un ciclo for, ma non al tipo int, ecc
Original:
An attribute can be used almost everywhere in the C++ program, and can be applied to almost everything: to types, to variables, to functions, to names, to code blocks, to entire translation units, although each particular attribute is only valid where it is permitted by the implementation: [[probably(true)]] can only be used with an if, and not with an class declaration. [[omp::parallel()]] can apply to a code block or to a for loop, but not to the type int, etc.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
In dichiarazioni, gli attributi possono apparire sia prima e subito dopo il nome del soggetto che viene dichiarato, nel qual caso essi sono combinati. Nella maggior parte delle altre situazioni, gli attributi si applicano alla società direttamente precedente.
Original:
In declarations, attributes may appear both before and directly after the name of the entity that is declared, in which case they are combined. In most other situations, attributes apply to the directly preceding entity.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alignas_specifier è una parte della sequenza identificatore di attributo, anche se ha una sintassi diversa. Può apparire, dove gli attributi [[...]] appaiono e può mescolare con loro (a condizione che sia utilizzato dove alignas è consentito)
Original:
alignas_specifier is a part of the attribute specifier sequence, although it has different syntax. It may appear where the [[...]] attributes appear and may mix with them (provided it is used where alignas is permitted)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Attributi standard

Solo i seguenti due attributi sono definiti dal C + + standard. Tutti gli altri attributi sono l'attuazione specifica.
Original:
Only the following two attributes are defined by the C++ standard. All other attributes are implementation-specific.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[[noreturn]]
Indica che la funzione non restituisce.
Questo attributo si applica per un funzionamento solo dichiarazioni. Il comportamento è indefinito se la funzione con questo attributo restituisce effettivamente.
The seguenti funzioni standard di questo attributo: std::_Exit, std::abort, std::exit, std::quick_exit, std::unexpected, std::terminate, std::rethrow_exception, std::throw_with_nested, std::rethrow_nested
Original:
Indicates that the function does not return.
This attribute applies to function declarations only. The behavior is undefined if the function with this attribute actually returns.
The following standard functions have this attribute: std::_Exit, std::abort, std::exit, std::quick_exit, std::unexpected, std::terminate, std::rethrow_exception, std::throw_with_nested, std::rethrow_nested
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[[carries_dependency]]
Indica che la catena di dipendenza nel comunicato-consumare std::memory_order propaga dentro e fuori della funzione, che consente al compilatore di saltare inutili recinzione attributo memoria instructions.
This può apparire in due situazioni:

1) si può applicare alle dichiarazioni di parametri di una funzione o lambda-espressioni, nel qual caso esso indica che l'inizializzazione del parametro porta in dipendenza lvalue a rvalue conversione che object.

2) Si può applicare alla dichiarazione di funzione come un tutto, nel qual caso esso indica che il valore di ritorno porta dipendenza alla valutazione dell'espressione chiamata di funzione .
Original:
Indicates that dependency chain in release-consume std::memory_order propagates in and out of the function, which allows the compiler to skip unnecessary memory fence instructions.
This attribute may appear in two situations:

1) it may apply to the parameter declarations of a function or lambda-expressions, in which case it indicates that initialization of the parameter carries dependency into lvalue-to-rvalue conversion of that object.

2) It may apply to the function declaration as a whole, in which case it indicates that the return value carries dependency to the evaluation of the 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.

[modifica] Esempio