std::is_compound
Aus cppreference.com
![]() | 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. |
definiert in Header <type_traits> | ||
template<class T > struct is_compound; | (seit C++11) | |
Wenn
T
eine Verbindung Typ (dh Array, Funktion, Objekt-Pointer, Funktion Zeiger, Mitglied Objektzeiger, Member-Funktion Zeiger, eine Referenz, Klasse, Gewerkschaft oder Enumeration, einschließlich etwaiger cv qualifizierte Varianten) bietet, das Mitglied konstanten value
gleich true. Für jede andere Art, value
ist false .Original:
If
T
is a compound type (that is, array, function, object pointer, function pointer, member object pointer, member function pointer, reference, class, union, or enumeration, including any cv-qualified variants), provides the member constant value
equal true. For any other type, value
is false.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.
Inhaltsverzeichnis |
Inherited from std::integral_constant
Member constants
value [statisch] | true wenn T is a compound type , false anders Original: true if T is a compound type , false otherwise The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public static Mitglied konstanten) |
Member functions
operator bool | wandelt das Objekt bool, gibt value Original: converts the object to bool, returns value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (öffentliche Elementfunktion) |
Member types
Type 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 |
value_type | bool |
type | std::integral_constant<bool, value> |
[Bearbeiten]Notes
Compound-Typen sind die Typen, die von Grundtypen aufgebaut sind. Jede C + + ist entweder grundlegende oder Verbindung .
Original:
Compound types are the types that are constructed from fundamental types. Any C++ type is either fundamental or compound.
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.
[Bearbeiten]Mögliche Implementierung
template<class T >struct is_compound :std::integral_constant<bool, !std::is_fundamental<T>::value>{}; |
[Bearbeiten]Beispiel
Output:
T is compound T is not a compound
[Bearbeiten]Siehe auch
(C++11) | prüft, ob ein Typ ist Grundtypus 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. (Klassen-Template) |
(C++11) | prüft, ob ein Typ ist skalaren Typ 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. (Klassen-Template) |
(C++11) | prüft, ob ein Typ ist Objekttyp 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. (Klassen-Template) |
(C++11) | prüft, ob ein Typ ist ein Array-Typ 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. (Klassen-Template) |