std::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. |
<metanoindex/>
<tbody> </tbody>| definiert in Header <memory>
|
||
template< class T > struct allocator; |
(1) | |
template<> struct allocator<void>; |
(2) | |
Die
std::allocator Klassen-Template ist die Standardeinstellung Allocator von allen Standard-Bibliothek Behlter verwendet, wenn kein Benutzer angegebenen allocator ist. Der Standardwert allocator staatenlos ist, das heit, alle Instanzen der gegebenen allocator austauschbar sind, sind gleich und knnen Speicher von einem anderen Instanz desselben allocator Typ zugeordnet freigeben .Original:
The
std::allocator class template is the default Allocator used by all standard library containers if no user-specified allocator is provided. The default allocator is stateless, that is, all instances of the given allocator are interchangeable, compare equal and can deallocate memory allocated by any other instance of the same allocator type.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.
Spezialisierung fr
void fehlen die Mitglied typedefs reference, const_reference, size_type und difference_type. Diese Spezialisierung erklrt keine Member-Funktionen .Original:
Specialization for
void lacks the member typedefs reference, const_reference, size_type and difference_type. This specialization declares no member functions.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.
| All custom allocators also must be stateless. | (bis C + +11) |
| Custom allocators may contain state. Each container or another allocator-aware object stores an instance of the supplied allocator and controls allocator replacement through std::allocator_traits. | (seit C++11) |
Mitglied Typen
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
|
T
|
pointer
|
T*
|
const_pointer
|
const T*
|
reference
|
T&
|
const_reference
|
const T&
|
size_type
|
std::size_t |
difference_type
|
std::ptrdiff_t |
rebind
|
template< class U > struct rebind { typedef allocator<U> other; };
|
Member-Funktionen
schafft eine neue Zuweisung Instanz Original: creates a new allocator instance The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (ffentliche Elementfunktion) | |
zerstrt sich einen Zuordner Instanz Original: destructs an allocator instance The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (ffentliche Elementfunktion) | |
erhlt die Adresse eines Objekts, selbst wenn operator& berladen ist (ffentliche Elementfunktion) | |
ordnet initialisierten Speicher Original: allocates uninitialized storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (ffentliche Elementfunktion) | |
| gibt Speicher frei (ffentliche Elementfunktion) | |
liefert den grten untersttzten Zuweisung Gre Original: returns the largest supported allocation size The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (ffentliche Elementfunktion) | |
baut ein Objekt in zugewiesenen Lagersttten Original: constructs an object in allocated storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (ffentliche Elementfunktion) | |
zerstrt sich ein Objekt im zugewiesenen Speicher Original: destructs an object in allocated storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (ffentliche Elementfunktion) | |
Non-Member-Funktionen
vergleicht zwei allocator Instanzen Original: compares two allocator instances The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (ffentliche Elementfunktion) | |
Siehe auch
(C++11) |
liefert Informationen ber Allokatoren (Klassen-Template) |
(C++11) |
implementiert die Zuweisung ber mehrere Ebenen fr Container, die in mehrfachen Ebene unterteilt sind (Klassen-Template) |
(C++11) |
prft, ob der angegebene Typ allokatorgesttzte Erzeugung untersttzt. (Klassen-Template) |