◐ Shell
clean mode source ↗

std::allocator_traits – cppreference.com

Aus cppreference.com

<metanoindex/>

<tbody> </tbody>

definiert in Header

<memory>

template< class Alloc > struct allocator_traits;

(seit C++11)

Die allocator_traits Klassen-Template bietet die standardisierten Weg, um verschiedene Eigenschaften von Zuweiser zugreifen. Die Standard-Containern und anderen Standard-Bibliothek-Komponenten Zugriff Zuweiser durch diese Vorlage, die es ermöglicht, jede Klasse Typ als allocator verwenden, solange der Benutzer bereitgestellten Spezialisierung allocator_traits implementiert alle erforderlichen Funktionalität macht .

Original:

The allocator_traits class template provides the standardized way to access various properties of allocators. The standard containers and other standard library components access allocators through this template, which makes it possible to use any class type as an allocator, as long as the user-provided specialization of allocator_traits implements all required functionality.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Der Standard, nicht spezialisierten, allocator_traits enthält die folgenden Mitglieder:

Original:

The default, non-specialized, allocator_traits contains the following members:

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

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
allocator_type Alloc
value_type Alloc::value_type
pointer

Alloc::pointer falls vorhanden, sonst value_type*

Original:

Alloc::pointer if present, otherwise value_type*

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

const_pointer

Alloc::const_pointer falls vorhanden, sonst std::pointer_traits<pointer>::rebind<const value_type>

Original:

Alloc::const_pointer if present, otherwise std::pointer_traits<pointer>::rebind<const value_type>

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

void_pointer

Alloc::void_pointer falls vorhanden, sonst std::pointer_traits<pointer>::rebind<void>

Original:

Alloc::void_pointer if present, otherwise std::pointer_traits<pointer>::rebind<void>

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

const_void_pointer

Alloc::const_void_pointer falls vorhanden, sonst std::pointer_traits<pointer>::rebind<const void>

Original:

Alloc::const_void_pointer if present, otherwise std::pointer_traits<pointer>::rebind<const void>

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

difference_type

Alloc::difference_type falls vorhanden, sonst std::pointer_traits<pointer>::difference_type

Original:

Alloc::difference_type if present, otherwise std::pointer_traits<pointer>::difference_type

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

size_type

Alloc::size_type falls vorhanden, sonst std::make_unsigned<difference_type>::type

Original:

Alloc::size_type if present, otherwise std::make_unsigned<difference_type>::type

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

propagate_on_container_copy_assignment

Alloc::propagate_on_container_copy_assignment falls vorhanden, sonst std::false_type

Original:

Alloc::propagate_on_container_copy_assignment if present, otherwise std::false_type

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

propagate_on_container_move_assignment

Alloc::propagate_on_container_move_assignment falls vorhanden, sonst std::false_type

Original:

Alloc::propagate_on_container_move_assignment if present, otherwise std::false_type

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

propagate_on_container_swap

Alloc::propagate_on_container_swap falls vorhanden, sonst std::false_type

Original:

Alloc::propagate_on_container_swap if present, otherwise std::false_type

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Mitglied alias Vorlagen

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
rebind_alloc<T>

Alloc::rebind<T>::other falls vorhanden, sonst Alloc<T, Args> wenn dies Alloc Alloc<U, Args> ist

Original:

Alloc::rebind<T>::other if present, otherwise Alloc<T, Args> if this Alloc is Alloc<U, Args>

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

rebind_traits<T> std::allocator_traits<rebind_alloc<T>>

Member-Funktionen

[statisch]

ordnet initialisierten Speicher mit der Zuweisung

Original:

allocates uninitialized storage using the allocator

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(public static Elementfunktion) [edit]

[statisch]

freigibt Speicher mit der Zuweisung

Original:

deallocates storage using the allocator

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(public static Elementfunktion) [edit]

[statisch]

konstruiert ein Objekt in dem zugewiesenen Speicher

Original:

constructs an object in the allocated storage

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(Funktions-Template) [edit]

[statisch]

zerstört sich ein Objekt in dem zugewiesenen Speicher abgelegt

Original:

destructs an object stored in the allocated storage

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(Funktions-Template) [edit]

[statisch]

gibt die maximale Objektgröße von der Zuweisung unterstützt

Original:

returns the maximum object size supported by the allocator

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(public static Elementfunktion) [edit]

erhält die Zuweisung nach dem Kopieren ein Standard-Container verwenden

Original:

obtains the allocator to use after copying a standard container

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(public static Elementfunktion) [edit]

Siehe auch

der Standardallokator
(Klassen-Template) [edit]
implementiert die Zuweisung über mehrere Ebenen für Container, die in mehrfachen Ebene unterteilt sind
(Klassen-Template) [edit]
liefert Informationen über zeigerähnliche Typen
(Klassen-Template) [edit]