Namensräume
Varianten
Aktionen

attribute specifier sequence(seit C++11)

Aus cppreference.com
< cpp‎ | language

 
 
Sprache C + +
Allgemeine Themen
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.
Flusskontrolle
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.
Bedingte Ausführung Aussagen
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.
Iterationsanweisungen
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.
Gehe Aussagen
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.
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funktion Erklärung
Lambda-Funktion Erklärung
Funktions-Template
inline-Spezifizierer
Exception-Spezifikationen (veraltet)
noexcept Spezifizierer (C++11)
Ausnahmen
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Namespaces
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Types
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 Planer
Lagerdauer Planer
constexpr Spezifizierer (C++11)
auto Spezifizierer (C++11)
alignas Spezifizierer (C++11)
Initialisierung
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Literale
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressions
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alternative Darstellungen
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.
Types
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
Typ Aliasdeklaration (C++11)
Attribute (C++11)
Wirft
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
impliziten Konvertierungen
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
C-Stil und funktionale Besetzung
Speicherzuweisung
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.
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Class-spezifische Funktion Eigenschaften
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.
explizit (C++11)
statisch
Besondere Member-Funktionen
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.
Templates
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Klassen-Template
Funktions-Template
Template-Spezialisierung
Parameter Packs (C++11)
Verschiedenes
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Inline Montage
 
Stellt die Implementierung definiert Attribute für Typen, Objekte, Code, etc.
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

[Bearbeiten] Erklärung

Attribute bilden die einheitlichen Standard Syntax für die Implementierung definiert Spracherweiterungen, wie die GNU und IBM Spracherweiterungen __attribute__((...)), Microsoft-Erweiterung __declspec(), etc.
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.
Ein Attribut kann fast überall in der C + +-Programm verwendet werden, und kann auf fast alles angewandt werden: die Typen, Variablen, Funktionen, um Namen, um Code-Blöcke, die gesamte Übersetzung Einheiten, obwohl jedes einzelne Attribut ist nur gültig, wenn es wird durch die Implementierung erlaubt: [[probably(true)]] kann nur mit einem if verwendet werden, und nicht mit einer Klassendeklaration. [[omp::parallel()]] kann zu einem Code zu einem Block oder for Schleife gelten, aber nicht mit dem Typ int, etc.
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 Erklärungen, können Attribute sowohl vor als auch unmittelbar nach dem Namen des Unternehmens, das erklärt, in welchem ​​Fall sie kombiniert werden angezeigt. In den meisten anderen Situationen, Attribute zu dem direkt vorausfahrenden Einheit gelten .
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 ist ein Teil des Attributs Spezifizierer Sequenz, obwohl es andere Syntax hat. Es kann vorkommen, wo die [[...]] Attribute und erscheinen mag mit ihnen (vorausgesetzt, es wird dort eingesetzt, wo alignas zulässig ist) mischen
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.

[Bearbeiten] Standard-Attribute

Nur die folgenden beiden Attribute werden von der C + +-Standard definiert. Alle anderen Attribute sind die Implementierung spezifischer .
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]]
Zeigt an, dass die Funktion nicht zurück.
Dieses Attribut gilt für Erklärungen nur dann funktionieren. Das Verhalten ist undefiniert, wenn die Funktion mit diesem Attribut tatsächlich zurückgibt.
The folgenden Standard-Funktionen besitzen dieses Attribut: 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]]
std::memory_order: Zeigt an, dass die Abhängigkeit Kette release-verbrauchen
breitet sich in und aus der Funktion, die der Compiler unnötigen Speicherplatz Zaun instructions.
This Attribut überspringen kann in zwei Situationen auftreten

1) es kann mit den Parameterdeklarationen einer Funktion oder Lambda-Ausdrücke gelten, in dem Fall zeigt, dass die Initialisierung des Parameters trägt Abhängigkeit in Lvalue-zu-R-Wert-Umwandlung dieses object.

2) Es kann an die Funktion Erklärung als Ganzes, in welchem ​​Fall es zeigt an, dass der Rückgabewert Abhängigkeit zu der Auswertung der Aufruf der Funktion Ausdruck führt zu .
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.

[Bearbeiten] Beispiel