Concepts
Aus cppreference.com
< cpp
|
|
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. |
<metanoindex/>
Ein Konzept ist ein Begriff, der eine benannte Menge von Anforderungen für einen Typ beschreibt. Konzepte sind ein bequemer Weg, um sowohl anzugeben, welche Eigenschaften von einem Typ zu erwarten sind, als auch welche Eigenschaften ein Typ hat.
Original:
A concept is a term that describes a named set of requirements for a type. Concepts are a more convenient way to specify both what properties are expected from a type, and what properties a type has.
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.
Es gab a proposal eine formale Spezifikation von Konzepten in C++11, mit der Zielsetzung, dass der Compiler die Art der Anforderungen vor der Instanziierung prüfen kann und somit sinnvollere Fehlermeldungen produzieren kann, falls ein Typ die Anforderungen des Templates nicht erfüllt. Dieser Vorschlag wurde später aus verschiedenen Gründen wieder fallen gelassen. Allerdings gibt es inoffizielle Pläne, in einer zukünftigen Version von C++ Konzepte wieder hinzuzufügen.
Original:
There was a proposal to include a formal specification of concepts into C++11 so that the compiler could check the type requirements before template instantiation and in turn could produce much more sensible error messages in case a type did not fulfill the template requirements. This proposal was later dropped for various reasons. However, there are unofficial plans to add concepts to a future revision of the C++ language.
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.
Die hier aufgeführten Konzepte haben wenig gemein mit dem oben genannten Vorschlag. Sie beziehen sich eher auf informelle Anforderungen, die in C++03 und C++11 verwendet werden, um das Verhalten und die erwarteten Eigenschaften verschiedener Typen zu definieren.
Original:
Here concepts have little in common with the abovementioned proposal. They refer to informal named requirements, used in C++03 and C++11 to define behavior and expected properties for various 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.
Original: Basic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
gibt an, dass Typ hat Standardkonstruktor Original: specifies that type has default constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) | |
(C++11) |
gibt an, dass Typ hat move Konstruktor Original: specifies that type has move constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) |
gibt an, dass Typ hat Copy-Konstruktor Original: specifies that type has copy constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) | |
(C++11) |
gibt an, dass move Zuweisungsoperator hat Original: specifies that type has 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. (Konzept) |
gibt an, dass Typ hat Zuweisungsoperator Original: specifies that type has 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. (Konzept) | |
Typ hat einen Destruktor, die alle Speicher gelöscht werden Original: type has a destructor that clears all memory The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) | |
Original: Layout The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| Note, that the standard doesn't define named requirements or concepts with names specified in this subcategory. These are type categories defined by the core language. They are included here as concepts only for consistency. | |
(C++11) |
Klasse mit trivialen Kopie, Zuweisung und Destruktor Original: class with trivial copy, assignment and destructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) |
(C++11) |
Klasse mit triviale Konstruktoren, Zuweisung und Destruktor Original: class with trivial constructors, assignment and destructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) |
(C++11) |
nicht-virtuellen-Klasse, die nur anderen Standardlayout Mitgliedern, die alle mit der gleichen Zutrittskontrolle Original: non-virtual class containing only other StandardLayout members, all with the same access control The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) |
POD (Plain Old Data) Struktur mit C struct Original: POD (Plain Old Data) structure, compatible with C struct The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) | |
Original: Library-wide The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
hat eine Arbeitsbreite operator==, die eine Äquivalenzrelation istOriginal: has a working operator== that is an equivalence relationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) | |
operator< ist eine strenge schwache OrdnungsrelationOriginal: operator< is a strict weak ordering relationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) | |
(C++11) |
kann mit einem uneingeschränkten Nichtmitgliedstaaten Funktionsaufruf swap() getauscht werden Original: can be swapped with an unqualified non-member function call swap() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) |
(C++11) |
ein Iterator, dass dereferences einer Swappable Typ Original: The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) |
(C++11) |
Zeiger-wie Typ unterstützen einen Nullwert Original: pointer-like type supporting a null value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Konzept) |
(C++11) |
(Konzept) |
Klasse Typ, der Allokation Informationen enthält Original: class type that contains allocation information The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click | |