std::uses_allocator
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 <memory> | ||
template<class T, class Alloc > struct uses_allocator | (seit C++11) | |
Wenn
T
ein Mitglied typedef allocator_type
die Cabrio von Alloc
ist, hat, stellt das Mitglied konstanten value
gleich true. Ansonsten value
ist false .Original:
If
T
has a member typedef allocator_type
which is convertible from Alloc
, provides the member constant value
equal to true. Otherwise 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 uses allocator Alloc , false anders Original: true if T uses allocator Alloc , 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]Spezialisierungen
Benutzerdefinierte Spezialisierungen des Typs trait std::uses_allocator sind für Typen, die nicht das Mitglied typedef
1) allocator_type
die aber eine der beiden folgenden Anforderungen erlaubt:Original:
Custom specializations of the type trait std::uses_allocator are allowed for types that do not have the member typedef
allocator_type
but satisfy one of the following two requirements: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.
T
hat einen Konstruktor, std::allocator_arg_t nimmt als erstes Argument und Alloc
als zweites Argument .Original:
T
has a constructor which takes std::allocator_arg_t as the first argument, and Alloc
as the second argument.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.
T
hat einen Konstruktor, Alloc
erfolgt als letztes Argument .Original:
T
has a constructor which takes Alloc
as the last argument.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 folgenden Spezialisierungen sind bereits von der Standard-Bibliothek zur Verfügung:
Original:
The following specializations are already provided by the standard library:
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.
spezialisiert die std::uses_allocator Typ Merkmal Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (class Template-Spezialisierung) | |
spezialisiert die std::uses_allocator Typ Merkmal Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktions-Template) | |
spezialisiert die std::uses_allocator Typ Merkmal Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktions-Template) | |
spezialisiert die std::uses_allocator Typ Merkmal Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktions-Template) | |
spezialisiert das std::uses_allocator Typenmerkmal (type trait) (class Template-Spezialisierung) | |
spezialisiert die std::uses_allocator Typ Merkmal Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (class Template-Spezialisierung) | |
spezialisiert die std::uses_allocator Typ Merkmal Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (class Template-Spezialisierung) |
[Bearbeiten]Notes
Diese Art Merkmal wird durch std::scoped_allocator_adaptor eingesetzt und kann durch individuelle Zuordnern verwendet werden, um zu bestimmen, ob das Objekt aufgebaut sich geeignet ist, unter Verwendung einer Zuweisungseinrichtung (zB ist ein Container), in welchem Fall eine Zuweisungseinrichtung an den Konstruktor übergeben werden müssen .
Original:
This type trait is used by std::scoped_allocator_adaptor and may be used by custom allocators to determine whether the object being constructed is itself capable of using an allocator (e.g. is a container), in which case an allocator should be passed to its constructor.
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]Siehe auch
(C++11) | eine Konstante, um Konstruktoren, die Allokatoren unterstützen, auswählen zu können (konstanten) |
(C++11) | Type zur Auswahl der Konstruktorüberladungen mit Allokatorunterstützung (Klasse) |
(C++11) | implementiert die Zuweisung über mehrere Ebenen für Container, die in mehrfachen Ebene unterteilt sind (Klassen-Template) |