Namensräume
Varianten
Aktionen

<div class="t-tr-text">C + + Konzepte:<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">C++ concepts:</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> Allocator

Aus cppreference.com
< cpp‎ | concept

 
 
C + + Konzepte
Basic
Original:
Basic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Library-Wide
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.
NullablePointer(C++11)
Hash(C++11)
Allocator
Container
Original:
Container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Container-Elemente
Original:
Container Elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterator
Original:
Iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Zufallszahlen
Original:
Random Numbers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Concurrency
Original:
Concurrency
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
BasicLockable(C++11)
Lockable(C++11)
TimedLockable(C++11)
Mutex(C++11)
TimedMutex(C++11)
Andere
Original:
Other
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Kapselt Speicherzuweisung und-freigabe Strategie .
Original:
Encapsulates memory allocation and deallocation strategy.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Jedes Standard-Bibliothek Komponente, müssen zuweisen oder veröffentlichen Lagerung kann von std::string, std::vector, und jeder Behälter mit Ausnahme std::array, um std::shared_ptr und std::function, tut dies durch eine Allocator: ein Objekt einer Klasse Typ, der die folgenden Anforderungen erfüllt .
Original:
Every standard library component that may need to allocate or release storage, from std::string, std::vector, and every container except std::array, to std::shared_ptr and std::function, does so through an Allocator: an object of a class type that satisfies the following requirements.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Einige Anforderungen sind optional: die Vorlage std::allocator_traits liefert die Standard-Implementierungen für alle optionalen Anforderungen, und alle Standard-Bibliothek Containern und anderen Allocator-aware Klassen Zugriff auf die Zuweisung durch std::allocator_traits, nicht direkt .
Original:
Some requirements are optional: the template std::allocator_traits supplies the default implementations for all optional requirements, and all standard library containers and other allocator-aware classes access the allocator through std::allocator_traits, not directly.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Anforderungen

Gegeben
Original:
Given
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • A ein Allocator für Typ T
    Original:
    A, an Allocator for type T
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • B die gleiche Allocator für Typ U
    Original:
    B, the same Allocator for type U
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ptr, ein Wert vom Typ allocator_traits<A>::pointer, durch Aufrufen allocator_traits<A>::allocate() erhalten
    Original:
    ptr, a value of type allocator_traits<A>::pointer, obtained by calling allocator_traits<A>::allocate()
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • cptr, ein Wert vom Typ allocator_traits<A>::const_pointer, durch Umwandlung aus ptr erhalten
    Original:
    cptr, a value of type allocator_traits<A>::const_pointer, obtained by conversion from ptr
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • vptr, ein Wert vom Typ allocator_traits<A>::void_pointer, durch Umwandlung aus ptr erhalten
    Original:
    vptr, a value of type allocator_traits<A>::void_pointer, obtained by conversion from ptr
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • cvptr, ein Wert vom Typ allocator_traits<A>::const_void_pointer, durch Umwandlung aus cptr oder aus vptr erhalten
    Original:
    cvptr, a value of type allocator_traits<A>::const_void_pointer, obtained by conversion from cptr or from vptr
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • xptr ein dereferencable Zeiger auf irgendeine Art X
    Original:
    xptr, a dereferencable pointer to some type X
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Expression Requirements Return type
A::pointer (optional) Satisfies NullablePointer and RandomAccessIterator
A::const_pointer (optional) A::pointer is convertible to A::const_pointer. Satisfies NullablePointer and RandomAccessIterator
A::void_pointer (optional) A::pointer is convertible to A::void_pointer
B::void_pointer und A::void_pointer sind vom gleichen Typ. Erfüllt NullablePointer
Original:
B::void_pointer and A::void_pointer are the same type. Satisfies NullablePointer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A::const_void_pointer (optional) A::pointer, A::const_pointer, and A::void_pointer are convertible to A::const_void_pointer
B::const_void_pointer und A::const_void_pointer sind vom gleichen Typ. Erfüllt NullablePointer
Original:
B::const_void_pointer and A::const_void_pointer are the same type. Satisfies NullablePointer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A::value_type the type T
A::size_type (optional) A::size_type can represent the size of the largest object A can allocate unsigned integer type
A::difference_type (optional) A::difference_type can represent the difference of any two pointers to the objects allocated by A signed integer type
A::template rebind<U>::other (optional [1]) for any U, B::template rebind<T>::other is A the type B
*ptr T&
*cptr *cptr and *ptr identify the same object const T&
ptr->m same as (*ptr).m, if (*ptr).m is well-defined the type of T::m
cptr->m same as (*cptr).m, if (*cptr).m is well-defined the type of T::m
static_cast<A::pointer>(vptr) static_cast<A::pointer>(vptr) == ptr A::pointer
static_cast<A::const_pointer>(cvptr) static_cast<A::const_pointer>(vptr) == cptr A::const_pointer
a.allocate(n) allocates storage suitable for n objects of type T, but does not construct them. May throw exceptions. A::pointer
a.allocate(n, cptr) (optional) same as a.allocate(n), but may use cptr in unspecified manner to aid locality A::pointer
a.deallocate(ptr, n) deallocates storage previously allocated by a call to a.allocate(n). Does not call destructors, if any objects were constructed, they must be destroyed before calling a.deallocate(). Does not throw exceptions. (not used)
a.max_size() (optional) the largest value that can be passed to A::allocate() A::size_type
a1 == a2 returns true only if the storage allocated by the allocator a1 can be deallocated through a2. Establishes reflexive, symmetric, and transitive relationship. Does not throw exceptions. bool
a1 != a2 same as !(a1==a2) bool
A a1(a) Copy-constructs a1 such that a1 == a. Does not throw exceptions.
A a(b) Constructs a such that B(a)==b and A(b)==a. Does not throw exceptions.
A a1(std::move(a)) Constructs a1 such that it equals the prior value of a. Does not throw exceptions.
A a(std::move(b)) Constructs a such that it equals the prior value of A(b). Does not throw exceptions.
a.construct(xptr, args) (optional) Constructs an object of type X in previously-allocated storage at the address pointed to by xptr, using args as the constructor arguments
a.destroy(xptr) (optional) Destructs an object of type X pointed to by xptr, but does not deallocate any storage.
a.select_on_container_copy_construction() (optional) Provides an instance of A to be used by the container that is copy-constructed from the one that uses a currently. Usually returns either a copy of a or a default-constructed A(). A
a.propagate_on_container_copy_assignment (optional) true if the allocator of type A needs to be copied when the container that uses it is copy-assigned std::true_type or std::false_type or derived from such
a.propagate_on_container_move_assignment (optional) true if the allocator of type A needs to be copied when the container that uses it is move-assigned std::true_type or std::false_type or derived from such
a.propagate_on_container_swap (optional) true if the allocators of type A need to be swapped when two containers that use them are swapped std::true_type or std::false_type or derived from such
Notes:
Original:
Notes:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[1] rebind ist nur optional (von std :: allocator_traits), wenn diese Zuweisung ist eine Vorlage des Formulars SomeAllocator <T, Args>, wo Args ist null oder mehr zusätzliche Template-Parameter .
Original:
[1] rebind is only optional (provided by std::allocator_traits) if this allocator is a template of the form SomeAllocator<T, Args>, where Args is zero or more additional template parameters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.