Namespaces
Variants

Standard library header <memory>

From cppreference.net
Standard library headers

Dieser Header ist Teil der dynamischen Speicherverwaltung Bibliothek.

Inhaltsverzeichnis

Includes

(C++20)
Unterstützung für den Drei-Wege-Vergleichsoperator

Klassen

Pointer-Traits
stellt Informationen über zeigerähnliche Typen bereit
(Klassentemplate)
Garbage Collector-Unterstützung
(C++11) (removed in C++23)
listet Zeiger-Sicherheitsmodelle auf
(enum)
Allokatoren
der Standard-Allokator
(Klassentemplate)
stellt Informationen über Allocator-Typen bereit
(Klassentemplate)
speichert die Adresse und die tatsächliche Größe des durch allocate_at_least allokierten Speichers
(Klassentemplate)
prüft, ob der angegebene Typ Uses-Allocator-Konstruktion unterstützt
(Klassentemplate)
Nicht initialisierter Speicher
(deprecated in C++17) (removed in C++20)
ein Iterator, der Standardalgorithmen ermöglicht, Ergebnisse in nicht initialisierten Speicher zu schreiben
(class template)
Smart Pointer
(C++11)
Smart Pointer mit eindeutiger Objektbesitz-Semantik
(Klassentemplate)
(C++11)
Intelligenter Zeiger mit Shared-Ownership-Semantik
(Klassentemplate)
(C++11)
Schwache Referenz auf ein Objekt, verwaltet durch std::shared_ptr
(Klassentemplate)
(deprecated in C++11) (removed in C++17)
Smart Pointer mit strengen Objektbesitz-Semantiken
(Klassentemplate)
Smart-Pointer-Adapter
(C++23)
interagiert mit Fremdzeigersetzern und setzt einen Smart Pointer bei Zerstörung zurück
(Klassentemplate)
interagiert mit fremden Pointer-Settern, erhält den anfänglichen Pointer-Wert von einem Smart Pointer und setzt ihn bei Zerstörung zurück
(Klassentemplate)
Typen für zusammengesetztes Klassendesign
(C++26)
Ein Wrapper, der ein dynamisch allokiertes Objekt mit wertähnlicher Semantik enthält
(Klassentemplate)
eine polymorphe Wrapper-Klasse, die dynamisch allokierte Objekte mit wertähnlicher Semantik enthält
(Klassen-Template)
Hilfsklassen
atomarer Shared Pointer
(Klassen-Template-Spezialisierung)
atomarer Weak-Zeiger
(Klassen-Template-Spezialisierung)
(C++11)
bietet gemischten, besitzerbasierten Vergleich von Shared und Weak Pointern
(Klassentemplate)
(C++26)
bietet owner-basiertes Hashing für Shared- und Weak-Pointer
(Klasse)
bietet gemischte owner-basierte Gleichheitsvergleiche für Shared- und Weak-Pointer
(Klasse)
ermöglicht es einem Objekt, einen shared_ptr zu erstellen, der auf sich selbst verweist
(Klassentemplate)
Ausnahme, die ausgelöst wird beim Zugriff auf einen weak_ptr , der auf ein bereits zerstörtes Objekt verweist
(Klasse)
Standard-Löscher für unique_ptr
(Klassen-Template)
Hash-Unterstützung für std::unique_ptr
(Klassen-Template-Spezialisierung)
Hash-Unterstützung für std::shared_ptr
(Klassen-Template-Spezialisierung)
Hash-Unterstützung für std::indirect
(Klassen-Template-Spezialisierung)
Forward-Deklarationen
Definiert im Header <functional>
(C++11)
Hash-Funktionsobjekt
(Klassentemplate)
Definiert in Header <atomic>
(C++11)
atomic-Klassen-Template und Spezialisierungen für bool, Ganzzahl, Gleitkomma, (seit C++20) und Zeigertypen
(Klassen-Template)

Tags

Ein Tag zur Auswahl von allokatorbewussten Konstruktoren
(Tag)

Funktionen

Uses-allocator-Konstruktion
bereitet die Argumentenliste vor, die dem für den gegebenen Typ erforderlichen uses-allocator-Konstruktionsstil entspricht
(Funktions-Template)
erstellt ein Objekt des angegebenen Typs mittels Uses-Allocator-Konstruktion
(Funktions-Template)
erstellt ein Objekt des angegebenen Typs an einem spezifischen Speicherort mittels Uses-Allocator-Konstruktion
(Funktions-Template)
Sonstiges
(C++20)
erhält einen Rohzeiger von einem zeigerähnlichen Typ
(Funktions-Template)
(C++11)
ermittelt die tatsächliche Adresse eines Objekts, selbst wenn der & Operator überladen ist
(Funktionsschablone)
(C++11)
richtet einen Zeiger in einem Puffer aus
(Funktion)
informiert den Compiler, dass ein Zeiger ausgerichtet ist
(Funktions-Template)
prüft, ob der Zeiger auf ein Objekt zeigt, dessen Ausrichtung mindestens den angegebenen Wert hat
(Funktionsschablone)
Explizite Lebensdauerverwaltung
erstellt implizit Objekte im angegebenen Speicherbereich unter Wiederverwendung der Objektrepräsentation
(Funktions-Template)
Garbage Collector-Unterstützung
(C++11) (entfernt in C++23)
deklariert, dass ein Objekt nicht recycelt werden kann
(Funktion)
(C++11) (entfernt in C++23)
deklariert, dass ein Objekt recycelt werden kann
(Funktions-Template)
(C++11) (entfernt in C++23)
deklariert, dass ein Speicherbereich keine verfolgbaren Zeiger enthält
(Funktion)
(C++11) (removed in C++23)
hebt die Wirkung von std::declare_no_pointers auf
(Funktion)
(C++11) (entfernt in C++23)
gibt das aktuelle Zeigersicherheitsmodell zurück
(Funktion)
Nicht initialisierter Speicher
kopiert eine Reihe von Objekten in einen nicht initialisierten Speicherbereich
(Funktions-Template)
kopiert eine Anzahl von Objekten in einen nicht initialisierten Speicherbereich
(Funktions-Template)
kopiert ein Objekt in einen nicht initialisierten Speicherbereich, definiert durch einen Bereich
(Funktions-Template)
kopiert ein Objekt in einen nicht initialisierten Speicherbereich, definiert durch einen Startpunkt und eine Anzahl
(Funktions-Template)
verschiebt eine Reihe von Objekten in einen nicht initialisierten Speicherbereich
(Funktions-Template)
bewegt eine Anzahl von Objekten in einen nicht initialisierten Speicherbereich
(Funktions-Template)
konstruiert Objekte durch Default-Initialisierung in einem nicht initialisierten Speicherbereich, definiert durch einen Bereich
(Funktions-Template)
konstruiert Objekte durch Default-Initialisierung in einem nicht initialisierten Speicherbereich, definiert durch einen Startpunkt und eine Anzahl
(Funktions-Template)
Konstruiert Objekte durch Wertinitialisierung in einem nicht initialisierten Speicherbereich, definiert durch einen Bereich
(Funktions-Template)
Konstruiert Objekte durch Wertinitialisierung in einem nicht initialisierten Speicherbereich, definiert durch einen Startpunkt und eine Anzahl
(Funktionsschablone)
erstellt ein Objekt an einer gegebenen Adresse
(Funktions-Template)
(C++17)
zerstört ein Objekt an einer gegebenen Adresse
(Funktions-Template)
(C++17)
zerstört eine Reihe von Objekten
(Funktions-Template)
(C++17)
zerstört eine Anzahl von Objekten in einem Bereich
(Funktionsschablone)
(deprecated in C++17) (removed in C++20)
erhält nicht initialisierten Speicher
(Funktions-Template)
(in C++17 veraltet) (in C++20 entfernt)
gibt nicht initialisierten Speicher frei
(Funktionstemplate)
Nicht-Member-Operationen für Smart Pointer
erstellt einen eindeutigen Zeiger, der ein neues Objekt verwaltet
(Funktions-Template)
vergleicht mit einem anderen unique_ptr oder mit nullptr
(Funktionsschablone)
erstellt einen shared pointer, der ein neues Objekt verwaltet
(Funktions-Template)
Erstellt einen Shared Pointer, der ein neues Objekt verwaltet, das mit einem Allokator alloziert wurde
(Funktions-Template)
wendet static_cast , dynamic_cast , const_cast oder reinterpret_cast auf den gespeicherten Zeiger an
(Funktionsschablone)
gibt den Deleter des angegebenen Typs zurück, falls vorhanden
(Funktions-Template)
(entfernt in C++20) (entfernt in C++20) (entfernt in C++20) (entfernt in C++20) (entfernt in C++20) (C++20)
vergleicht mit einem anderen shared_ptr oder mit nullptr
(Funktions-Template)
gibt den Wert des gespeicherten Zeigers an einen Ausgabestrom aus
(Funktionsschablone)
gibt den Wert des verwalteten Zeigers an einen Ausgabestrom aus
(Funktionsschablone)
spezialisiert den std::swap Algorithmus
(Funktionsschablone)
spezialisiert den std::swap Algorithmus
(Funktionsschablone)
spezialisiert den std::swap Algorithmus
(Funktions-Template)
Smart-Pointer-Adapter-Erstellung
(C++23)
erzeugt einen out_ptr_t mit einem zugehörigen Smart Pointer und Reset-Argumenten
(Funktions-Template)
(C++23)
Erstellt einen inout_ptr_t mit einem zugehörigen Smart Pointer und Reset-Argumenten
(Funktions-Template)
spezialisiert atomare Operationen für std::shared_ptr
(Funktions-Template)

Funktionsartige Entitäten

Definiert im Namespace std::ranges
Nicht initialisierter Speicher
kopiert eine Reihe von Objekten in einen nicht initialisierten Speicherbereich
(Algorithmus-Funktionsobjekt)
kopiert eine Anzahl von Objekten in einen nicht initialisierten Speicherbereich
(Algorithmus-Funktionsobjekt)
kopiert ein Objekt in einen nicht initialisierten Speicherbereich, definiert durch einen Bereich
(Algorithmus-Funktionsobjekt)
kopiert ein Objekt in einen nicht initialisierten Speicherbereich, definiert durch einen Start und eine Anzahl
(Algorithmus-Funktionsobjekt)
verschiebt eine Reihe von Objekten in einen nicht initialisierten Speicherbereich
(Algorithmus-Funktionsobjekt)
verschiebt eine Anzahl von Objekten in einen nicht initialisierten Speicherbereich
(Algorithmus-Funktionsobjekt)
konstruiert Objekte durch Default-Initialisierung in einem nicht initialisierten Speicherbereich, definiert durch einen Bereich
(Algorithmus-Funktionsobjekt)
konstruiert Objekte durch Default-Initialisierung in einem nicht initialisierten Speicherbereich, definiert durch einen Start und eine Anzahl
(Algorithmus-Funktionsobjekt)
konstruiert Objekte durch Wert-Initialisierung in einem nicht initialisierten Speicherbereich, definiert durch einen Bereich
(Algorithmus-Funktionsobjekt)
konstruiert Objekte durch Wert-Initialisierung in einem nicht initialisierten Speicherbereich, definiert durch einen Start und eine Anzahl
(Algorithmus-Funktionsobjekt)
erstellt ein Objekt an einer gegebenen Adresse
(Algorithmus-Funktionsobjekt)
zerstört ein Objekt an einer gegebenen Adresse
(Algorithmus-Funktionsobjekt)
zerstört eine Reihe von Objekten
(Algorithmus-Funktionsobjekt)
zerstört eine Anzahl von Objekten in einem Bereich
(Algorithmus-Funktionsobjekt)

Übersicht

#include <compare>
namespace std {
  // Zeiger-Traits
  template<class Ptr>
  struct pointer_traits; // freestanding
  template<class T>
  struct pointer_traits<T*>; // freestanding
  // Zeiger-Konvertierung
  template<class T>
  constexpr T* to_address(T* p) noexcept; // freestanding
  template<class Ptr>
  constexpr auto to_address(const Ptr& p) noexcept; // freestanding
  // Zeigerausrichtung
  void* align(size_t alignment, size_t size, void*& ptr, size_t& space); // freestanding
  template<size_t N, class T>
  constexpr T* assume_aligned(T* ptr); // freestanding
  template<size_t Alignment, class T>
  bool is_sufficiently_aligned(T* ptr);
  // explizite Lebensdauerverwaltung
  template<class T>
  T* start_lifetime_as(void* p) noexcept; // freestanding
  template<class T>
  const T* start_lifetime_as(const void* p) noexcept; // freestanding
  template<class T>
  volatile T* start_lifetime_as(volatile void* p) noexcept; // freestanding
  template<class T>
  const volatile T* start_lifetime_as(const volatile void* p) noexcept; // freestanding
  template<class T>
  T* start_lifetime_as_array(void* p, size_t n) noexcept; // freestanding
  template<class T>
  const T* start_lifetime_as_array(const void* p, size_t n) noexcept; // freestanding
  template<class T>
  volatile T* start_lifetime_as_array(volatile void* p,
                                      size_t n) noexcept; // freestanding
  template<class T>
  const volatile T* start_lifetime_as_array(const volatile void* p, // freestanding
                                            size_t n) noexcept;
  template<class T>
  T* trivially_relocate(T* first, T* last, T* result); // freestanding
  template<class T>
  constexpr T* relocate(T* first, T* last, T* result); // freestanding
  // Allokator-Argument-Tag
  struct allocator_arg_t
  {
    explicit allocator_arg_t() = default;
  };                                                // freestanding
  inline constexpr allocator_arg_t allocator_arg{}; // freestanding
  // uses_allocator
  template<class T, class Alloc>
  struct uses_allocator; // freestanding
  // uses_allocator
  template<class T, class Alloc>
  constexpr bool uses_allocator_v = uses_allocator<T, Alloc>::value; // freestanding
  // uses-allocator construction
  template<class T, class Alloc, class... Args>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  Args&&... args) noexcept;
  template<class T, class Alloc, class Tuple1, class Tuple2>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  piecewise_construct_t,
                                                  Tuple1&& x,
                                                  Tuple2&& y) noexcept;
  template<class T, class Alloc>
  constexpr auto uses_allocator_construction_args(
    const Alloc& alloc) noexcept; // freestanding
  template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  U&& u,
                                                  V&& v) noexcept;
  template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  pair<U, V>& pr) noexcept;
  template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  const pair<U, V>& pr) noexcept;
  template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  pair<U, V>&& pr) noexcept;
  template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  const pair<U, V>&& pr) noexcept;
  template<class T, class Alloc, /*paarartig*/ P>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  P&& p) noexcept;
  template<class T, class Alloc, class U>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding
                                                  U&& u) noexcept;
  template<class T, class Alloc, class... Args>
  constexpr T make_obj_using_allocator(const Alloc& alloc,
                                       Args&&... args); // freestanding
  template<class T, class Alloc, class... Args>
  constexpr T* uninitialized_construct_using_allocator(T* p, // freestanding
                                                       const Alloc& alloc,
                                                       Args&&... args);
  // allocator Traits
  template<class Alloc>
  struct allocator_traits; // freestanding
  template<class Pointer, class SizeType = size_t>
  struct allocation_result
  { // freestanding
    Pointer ptr;
    SizeType count;
  };
  // der Standard-Allokator
  template<class T>
  class allocator;
  template<class T, class U>
  constexpr bool operator==(const allocator<T>&, const allocator<U>&) noexcept;
  // addressof
  template<class T>
  constexpr T* addressof(T& r) noexcept; // freestanding
  template<class T>
  const T* addressof(const T&&) = delete; // freestanding
  // spezialisierte Algorithmen
  // spezielle Speicherkonzepte
  template<class I>
  concept no-throw-input-iterator = /* siehe Beschreibung */; // exposition-only
  template<class I>
  concept no-throw-forward-iterator = /* siehe Beschreibung */; // exposition-only
  template<class S, class I>
  concept no-throw-sentinel-for = /* siehe Beschreibung */; // exposition-only
  template<class R>
  concept no-throw-input-range = /* siehe Beschreibung */; // exposition-only
  template<class R>
  concept no-throw-forward-range = /* siehe Beschreibung */; // exposition-only
  template<class NoThrowForwardIter>
  constexpr void uninitialized_default_construct(NoThrowForwardIter first, // freestanding
                                                 NoThrowForwardIter last);
  template<class ExecutionPolicy, class NoThrowForwardIter>
  void uninitialized_default_construct(ExecutionPolicy&& exec, // freestanding-deleted,
                                       NoThrowForwardIter first,
                                       NoThrowForwardIter last);
  template<class NoThrowForwardIter, class Size>
  constexpr NoThrowForwardIter uninitialized_default_construct_n(NoThrowForwardIter first,
                                                                 Size n); // freestanding
  template<class ExecutionPolicy, class NoThrowForwardIter, class Size>
  NoThrowForwardIter uninitialized_default_construct_n(
    ExecutionPolicy&& exec, // freestanding-deleted,
    NoThrowForwardIter first,
    Size n);
  namespace ranges {
    template<no-throw-forward-iterator I, no-throw-sentinel-for<I> S>
      requires default_initializable<iter_value_t<I>>
    constexpr I uninitialized_default_construct(I first, S last); // freestanding
    template<no-throw-forward-range R>
      requires default_initializable<range_value_t<R>>
    constexpr borrowed_iterator_t<R> uninitialized_default_construct(
      R&& r); // freestanding
    template<no-throw-forward-iterator I>
      requires default_initializable<iter_value_t<I>>
    constexpr I uninitialized_default_construct_n(I first, // freestanding
                                                  iter_difference_t<I> n);
  }
  template<class NoThrowForwardIter>
  constexpr void uninitialized_value_construct(NoThrowForwardIter first, // freestanding
                                               NoThrowForwardIter last);
  template<class ExecutionPolicy, class NoThrowForwardIter>
  void uninitialized_value_construct(ExecutionPolicy&& exec, // freestanding-deleted,
                                     NoThrowForwardIter first,
                                     NoThrowForwardIter last);
  template<class NoThrowForwardIter, class Size>
  constexpr NoThrowForwardIter uninitialized_value_construct_n(NoThrowForwardIter first,
                                                               Size n); // freestanding
  template<class ExecutionPolicy, class NoThrowForwardIter, class Size>
  NoThrowForwardIter uninitialized_value_construct_n(
    ExecutionPolicy&& exec, // freestanding-deleted,
    NoThrowForwardIter first,
    Size n);
  namespace ranges {
    template<no-throw-forward-iterator I, no-throw-sentinel-for<I> S>
      requires default_initializable<iter_value_t<I>>
    constexpr I uninitialized_value_construct(I first, S last); // freestanding
    template<no-throw-forward-range R>
      requires default_initializable<range_value_t<R>>
    constexpr borrowed_iterator_t<R> uninitialized_value_construct(R&& r); // freestanding
    template<no-throw-forward-iterator I>
      requires default_initializable<iter_value_t<I>>
    constexpr I uninitialized_value_construct_n(I first, // freestanding
                                                iter_difference_t<I> n);
  }
  template<class InputIter, class NoThrowForwardIter>
  constexpr NoThrowForwardIter uninitialized_copy(InputIter first, // freestanding
                                                  InputIter last,
                                                  NoThrowForwardIter result);
  template<class ExecutionPolicy, class ForwardIter, class NoThrowForwardIter>
  NoThrowForwardIter uninitialized_copy(ExecutionPolicy&& exec, // freestanding-deleted,
                                        ForwardIter first,
                                        ForwardIter last,
                                        NoThrowForwardIter result);
  template<class InputIter, class Size, class NoThrowForwardIter>
  constexpr NoThrowForwardIter uninitialized_copy_n(InputIter first, // freestanding
                                                    Size n,
                                                    NoThrowForwardIter result);
  template<class ExecutionPolicy,
           class ForwardIter,
           class Size,
           class NoThrowForwardIter>
  NoThrowForwardIter uninitialized_copy_n(ExecutionPolicy&& exec, // freestanding-deleted,
                                          ForwardIter first,
                                          Size n,
                                          NoThrowForwardIter result);
  namespace ranges {
    template<class I, class O>
    using uninitialized_copy_result = in_out_result<I, O>; // freestanding
    template<input_iterator I,
             sentinel_for<I> S1,
             no-throw-forward-iterator O,
             no-throw-sentinel-for<O> S2>
      requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
    constexpr uninitialized_copy_result<I, O>
    uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); // freestanding
    template<input_range IR, no-throw-forward-range OR>
      requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
    constexpr uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
    uninitialized_copy(IR&& in_range, OR&& out_range); // freestanding
    template<class I, class O>
    using uninitialized_copy_n_result = in_out_result<I, O>; // freestanding
    template<input_iterator I,
             no-throw-forward-iterator O,
             no-throw-sentinel-for<O> S>
      requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
    constexpr uninitialized_copy_n_result<I, O> uninitialized_copy_n(
      I ifirst,
      iter_difference_t<I> n, // freestanding
      O ofirst,
      S olast);
  }
  template<class InputIter, class NoThrowForwardIter>
  constexpr NoThrowForwardIter uninitialized_move(InputIter first, // freestanding
                                                  InputIter last,
                                                  NoThrowForwardIter result);
  template<class ExecutionPolicy, class ForwardIter, class NoThrowForwardIter>
  NoThrowForwardIter uninitialized_move(ExecutionPolicy&& exec, // freestanding-deleted,
                                        ForwardIter first,
                                        ForwardIter last,
                                        NoThrowForwardIter result);
  template<class InputIter, class Size, class NoThrowForwardIter>
  constexpr pair<InputIter, NoThrowForwardIter> uninitialized_move_n(
    InputIter first,
    Size n, // freestanding
    NoThrowForwardIter result);
  template<class ExecutionPolicy, class ForwardIter, class Size, class NoThrowForwardIter>
  pair<ForwardIter, NoThrowForwardIter> uninitialized_move_n(
    ExecutionPolicy&& exec, // freestanding-deleted,
    ForwardIter first,
    Size n,
    NoThrowForwardIter result);
  namespace ranges {
    template<class I, class O>
    using uninitialized_move_result = in_out_result<I, O>; // freestanding
    template<input_iterator I,
             sentinel_for<I> S1,
             no-throw-forward-iterator O,
             no-throw-sentinel-for<O> S2>
      requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
    constexpr uninitialized_move_result<I, O>
    uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); // freestanding
    template<input_range IR, no-throw-forward-range OR>
      requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
    constexpr uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
    uninitialized_move(IR&& in_range, OR&& out_range); // freestanding
    template<class I, class O>
    using uninitialized_move_n_result = in_out_result<I, O>; // freestanding
    template<input_iterator I,
             no-throw-forward-iterator O,
             no-throw-sentinel-for<O> S>
      requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
    constexpr uninitialized_move_n_result<I, O> uninitialized_move_n(
      I ifirst,
      iter_difference_t<I> n, // freestanding
      O ofirst,
      S olast);
  }
  template<class NoThrowForwardIter, class T>
  constexpr void uninitialized_fill(NoThrowForwardIter first, // freestanding
                                    NoThrowForwardIter last,
                                    const T& x);
  template<class ExecutionPolicy, class NoThrowForwardIter, class T>
  void uninitialized_fill(ExecutionPolicy&& exec, // freestanding-deleted,
                          NoThrowForwardIter first,
                          NoThrowForwardIter last,
                          const T& x);
  template<class NoThrowForwardIter, class Size, class T>
  constexpr NoThrowForwardIter uninitialized_fill_n(NoThrowForwardIter first,
                                                    Size n,
                                                    const T& x); // freestanding
  template<class ExecutionPolicy, class NoThrowForwardIter, class Size, class T>
  NoThrowForwardIter uninitialized_fill_n(ExecutionPolicy&& exec, // freestanding-deleted,
                                          NoThrowForwardIter first,
                                          Size n,
                                          const T& x);
  namespace ranges {
    template<no-throw-forward-iterator I, no-throw-sentinel-for<I> S, class T>
      requires constructible_from<iter_value_t<I>, const T&>
    constexpr I uninitialized_fill(I first, S last, const T& x); // freestanding
    template<no-throw-forward-range R, class T>
      requires constructible_from<range_value_t<R>, const T&>
    constexpr borrowed_iterator_t<R> uninitialized_fill(R&& r,
                                                        const T& x); // freestanding
    template<no-throw-forward-iterator I, class T>
      requires constructible_from<iter_value_t<I>, const T&>
    constexpr I uninitialized_fill_n(I first, // freestanding
                                     iter_difference_t<I> n,
                                     const T& x);
  }
  // construct_at
  template<class T, class... Args>
  constexpr T* construct_at(T* location, Args&&... args); // freestanding
  namespace ranges {
    template<class T, class... Args>
    constexpr T* construct_at(T* location, Args&&... args); // freestanding
  }
  // zerstören
  template<class T>
  constexpr void destroy_at(T* location); // freestanding
  template<class NoThrowForwardIter>
  constexpr void destroy(NoThrowForwardIter first, // freestanding
                         NoThrowForwardIter last);
  template<class ExecutionPolicy, class NoThrowForwardIter>
  void destroy(ExecutionPolicy&& exec, // freestanding-deleted,
               NoThrowForwardIter first,
               NoThrowForwardIter last);
  template<class NoThrowForwardIter, class Size>
  constexpr NoThrowForwardIter destroy_n(NoThrowForwardIter first, // freestanding
                                         Size n);
  template<class ExecutionPolicy, class NoThrowForwardIter, class Size>
  NoThrowForwardIter destroy_n(ExecutionPolicy&& exec, // freestanding-deleted,
                               NoThrowForwardIter first,
                               Size n);
  namespace ranges {
    template<destructible T>
    constexpr void destroy_at(T* location) noexcept; // freestanding
    template<no-throw-input-iterator I, no-throw-sentinel-for<I> S>
      requires destructible<iter_value_t<I>>
    constexpr I destroy(I first, S last) noexcept; // freestanding
    template<no-throw-input-range R>
      requires destructible<range_value_t<R>>
    constexpr borrowed_iterator_t<R> destroy(R&& r) noexcept; // freestanding
    template<no-throw-input-iterator I>
      requires destructible<iter_value_t<I>>
    constexpr I destroy_n(I first, iter_difference_t<I> n) noexcept; // freestanding
  }
  // Klassentemplate unique_ptr
  template<class T>
  struct default_delete; // freestanding
  template<class T>
  struct default_delete<T[]>; // freestanding
  template<class T, class D = default_delete<T>>
  class unique_ptr; // freestanding
  template<class T, class D>
  class unique_ptr<T[], D>; // freestanding
  template<class T, class... Args>
  constexpr unique_ptr<T> make_unique(Args&&... args); // T ist kein Array
  template<class T>
  constexpr unique_ptr<T> make_unique(size_t n); // T ist U[]
  template<class T, class... Args>
  /* nicht spezifiziert */ make_unique(Args&&...) = delete; // T ist U[N]
  template<class T>
  constexpr unique_ptr<T> make_unique_for_overwrite(); // T ist kein Array
  template<class T>
  constexpr unique_ptr<T> make_unique_for_overwrite(size_t n); // T ist U[]
  template<class T, class... Args>
  /* nicht spezifiziert */ make_unique_for_overwrite(Args&&...) = delete; // T ist U[N]
  template<class T, class D>
  constexpr void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept; // freestanding
  template<class T1, class D1, class T2, class D2>
  constexpr bool operator==(const unique_ptr<T1, D1>& x, // freestanding
                            const unique_ptr<T2, D2>& y);
  template<class T1, class D1, class T2, class D2>
  bool operator<(const unique_ptr<T1, D1>& x,
                 const unique_ptr<T2, D2>& y); // freestanding
  template<class T1, class D1, class T2, class D2>
  bool operator>(const unique_ptr<T1, D1>& x,
                 const unique_ptr<T2, D2>& y); // freestanding
  template<class T1, class D1, class T2, class D2>
  bool operator<=(const unique_ptr<T1, D1>& x,
                  const unique_ptr<T2, D2>& y); // freestanding
  template<class T1, class D1, class T2, class D2>
  bool operator>=(const unique_ptr<T1, D1>& x,
                  const unique_ptr<T2, D2>& y); // freestanding
  template<class T1, class D1, class T2, class D2>
    requires three_way_comparable_with<typename unique_ptr<T1, D1>::pointer,
                                       typename unique_ptr<T2, D2>::pointer>
  compare_three_way_result_t<typename unique_ptr<T1, D1>::pointer,
                             typename unique_ptr<T2, D2>::pointer>
  operator<=>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y); // freestanding
  template<class T, class D>
  constexpr bool operator==(const unique_ptr<T, D>& x,
                            nullptr_t) noexcept; // freestanding
  template<class T, class D>
  constexpr bool operator<(const unique_ptr<T, D>& x, nullptr_t); // freestanding
  template<class T, class D>
  constexpr bool operator<(nullptr_t, const unique_ptr<T, D>& y); // freestanding
  template<class T, class D>
  constexpr bool operator>(const unique_ptr<T, D>& x, nullptr_t); // freestanding
  template<class T, class D>
  constexpr bool operator>(nullptr_t, const unique_ptr<T, D>& y); // freestanding
  template<class T, class D>
  constexpr bool operator<=(const unique_ptr<T, D>& x, nullptr_t); // freestanding
  template<class T, class D>
  constexpr bool operator<=(nullptr_t, const unique_ptr<T, D>& y); // freestanding
  template<class T, class D>
  constexpr bool operator>=(const unique_ptr<T, D>& x, nullptr_t); // freestanding
  template<class T, class D>
  constexpr bool operator>=(nullptr_t, const unique_ptr<T, D>& y); // freestanding
  template<class T, class D>
    requires three_way_comparable<typename unique_ptr<T, D>::pointer>
  constexpr compare_three_way_result_t<typename unique_ptr<T, D>::pointer> operator<=>(
    const unique_ptr<T, D>& x,
    nullptr_t); // freestanding
  template<class E, class T, class Y, class D>
  basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os, const unique_ptr<Y, D>& p);
  // class bad_weak_ptr
  class bad_weak_ptr;
  // Klassentemplate shared_ptr
  template<class T>
  class shared_ptr;
  // shared_ptr Erstellung
  template<class T, class... Args>
  shared_ptr<T> make_shared(Args&&... args); // T ist kein Array
  template<class T, class A, class... Args>
  shared_ptr<T> allocate_shared(const A& a, Args&&... args); // T ist kein Array
  template<class T>
  shared_ptr<T> make_shared(size_t N); // T ist U[]
  template<class T, class A>
  shared_ptr<T> allocate_shared(const A& a, size_t N); // T ist U[]
  template<class T>
  shared_ptr<T> make_shared(); // T ist U[N]
  template<class T, class A>
  shared_ptr<T> allocate_shared(const A& a); // T ist U[N]
  template<class T>
  shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // T ist U[]
  template<class T, class A>
  shared_ptr<T> allocate_shared(const A& a,
                                size_t N,
                                const remove_extent_t<T>& u); // T ist U[]
  template<class T>
  shared_ptr<T> make_shared(const remove_extent_t<T>& u); // T ist U[N]
  template<class T, class A>
  shared_ptr<T> allocate_shared(const A& a, const remove_extent_t<T>& u); // T ist U[N]
  template<class T>
  shared_ptr<T> make_shared_for_overwrite(); // T ist nicht U[]
  template<class T, class A>
  shared_ptr<T> allocate_shared_for_overwrite(const A& a); // T ist nicht U[]
  template<class T>
  shared_ptr<T> make_shared_for_overwrite(size_t N); // T ist U[]
  template<class T, class A>
  shared_ptr<T> allocate_shared_for_overwrite(const A& a, size_t N); // T ist U[]
  // shared_ptr-Vergleiche
  template<class T, class U>
  bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
  template<class T, class U>
  strong_ordering operator<=>(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
  template<class T>
  bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
  template<class T>
  strong_ordering operator<=>(const shared_ptr<T>& x, nullptr_t) noexcept;
  // shared_ptr spezialisierte Algorithmen
  template<class T>
  void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
  // shared_ptr Umwandlungen
  template<class T, class U>
  shared_ptr<T> static_pointer_cast(const shared_ptr<U>& r) noexcept;
  template<class T, class U>
  shared_ptr<T> static_pointer_cast(shared_ptr<U>&& r) noexcept;
  template<class T, class U>
  shared_ptr<T> dynamic_pointer_cast(const shared_ptr<U>& r) noexcept;
  template<class T, class U>
  shared_ptr<T> dynamic_pointer_cast(shared_ptr<U>&& r) noexcept;
  template<class T, class U>
  shared_ptr<T> const_pointer_cast(const shared_ptr<U>& r) noexcept;
  template<class T, class U>
  shared_ptr<T> const_pointer_cast(shared_ptr<U>&& r) noexcept;
  template<class T, class U>
  shared_ptr<T> reinterpret_pointer_cast(const shared_ptr<U>& r) noexcept;
  template<class T, class U>
  shared_ptr<T> reinterpret_pointer_cast(shared_ptr<U>&& r) noexcept;
  // shared_ptr get_deleter
  template<class D, class T>
  D* get_deleter(const shared_ptr<T>& p) noexcept;
  // shared_ptr I/O
  template<class E, class T, class Y>
  basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os, const shared_ptr<Y>& p);
  // Klassentemplate weak_ptr
  template<class T>
  class weak_ptr;
  // weak_ptr spezialisierte Algorithmen
  template<class T>
  void swap(weak_ptr<T>& a, weak_ptr<T>& b) noexcept;
  // Klassentemplate owner_less
  template<class T = void>
  struct owner_less;
  // struct owner_hash
  struct owner_hash;
  // struct owner_equal
  struct owner_equal;
  // class template enable_shared_from_this
  template<class T>
  class enable_shared_from_this;
  // Hash-Unterstützung
  template<class T>
  struct hash; // freestanding
  template<class T, class D>
  struct hash<unique_ptr<T, D>>; // freestanding
  template<class T>
  struct hash<shared_ptr<T>>;
  // atomare Smart Pointer
  template<class T>
  struct atomic; // freestanding
  template<class T>
  struct atomic<shared_ptr<T>>;
  template<class T>
  struct atomic<weak_ptr<T>>;
  // Klassentemplate out_ptr_t
  template<class Smart, class Pointer, class... Args>
  class out_ptr_t; // freestanding
  // Funktionsvorlage out_ptr
  template<class Pointer = void, class Smart, class... Args>
  auto out_ptr(Smart& s, Args&&... args); // freestanding
  // Klassentemplate inout_ptr_t
  template<class Smart, class Pointer, class... Args>
  class inout_ptr_t; // freestanding
  // Funktionsvorlage inout_ptr
  template<class Pointer = void, class Smart, class... Args>
  auto inout_ptr(Smart& s, Args&&... args); // freestanding
  // Klassentemplate indirect
  template<class T, class Allocator = allocator<T>>
  class indirect;
  // Hash-Unterstützung
  template<class T, class Alloc>
  struct hash<indirect<T, Alloc>>;
  // Klassentemplate polymorphic
  template<class T, class Allocator = allocator<T>>
  class polymorphic;
  namespace pmr {
    template<class T>
    using indirect = indirect<T, polymorphic_allocator<T>>;
    template<class T>
    using polymorphic = polymorphic<T, polymorphic_allocator<T>>;
  }
}

Hilfskonzepte

Hinweis: Diese Namen dienen nur der Darstellung, sie sind nicht Teil der Schnittstelle.

template<class I>
concept no-throw-input-iterator = // nur zur Darstellung
  input_iterator<I> &&
  is_lvalue_reference_v<iter_reference_t<I>> &&
  same_as<remove_cvref_t<iter_reference_t<I>>, iter_value_t<I>>;
template<class S, class I>
concept no-throw-sentinel-for = sentinel_for<S, I>; // nur zur Darstellung
template<class R>
concept no-throw-input-range = // nur zur Darstellung
  ranges::range<R> &&
  no-throw-input-iterator<ranges::iterator_t<R>> &&
  no-throw-sentinel-for<ranges::sentinel_t<R>, ranges::iterator_t<R>>;
template<class I>
concept no-throw-forward-iterator = // nur zur Darstellung
  no-throw-input-iterator<I> &&
  forward_iterator<I> &&
  no-throw-sentinel-for<I, I>;
template<class R>
concept no-throw-forward-range = // nur zur Darstellung
  no-throw-input-range<R> &&
  no-throw-forward-iterator<ranges::iterator_t<R>>;

Klassentemplate std::pointer_traits

namespace std {
  template<class Ptr>
  struct pointer_traits
  {
    /* siehe Beschreibung */;
  };
  template<class T>
  struct pointer_traits<T*>
  {
    using pointer         = T*;
    using element_type    = T;
    using difference_type = ptrdiff_t;
    template<class U>
    using rebind = U*;
    static constexpr pointer pointer_to(/* siehe Beschreibung */ r) noexcept;
  };
}
**Übersetzungsdetails:** - HTML-Tags und Attribute wurden unverändert beibehalten - Code innerhalb der `
`-Tags wurde nicht übersetzt
- C++-spezifische Begriffe (namespace, template, struct, using, static, constexpr, noexcept, etc.) wurden nicht übersetzt
- Nur der Kommentar "/* see description */" wurde zu "/* siehe Beschreibung */" übersetzt
- Die Formatierung und Struktur des Originalcodes bleibt vollständig erhalten

Klasse std::allocator_arg_t

namespace std {
  struct allocator_arg_t { explicit allocator_arg_t() = default; };
  inline constexpr allocator_arg_t allocator_arg{};
}

Klassentemplate std::allocator_traits

namespace std {
  template<class Alloc>
  struct allocator_traits
  {
    using allocator_type                         = Alloc;
    using value_type                             = typename Alloc::value_type;
    using pointer                                = /* siehe Beschreibung */;
    using const_pointer                          = /* siehe Beschreibung */;
    using void_pointer                           = /* siehe Beschreibung */;
    using const_void_pointer                     = /* siehe Beschreibung */;
    using difference_type                        = /* siehe Beschreibung */;
    using size_type                              = /* siehe Beschreibung */;
    using propagate_on_container_copy_assignment = /* siehe Beschreibung */;
    using propagate_on_container_move_assignment = /* siehe Beschreibung */;
    using propagate_on_container_swap            = /* siehe Beschreibung */;
    using is_always_equal                        = /* siehe Beschreibung */;
    template<class T>
    using rebind_alloc = /* siehe Beschreibung */;
    template<class T>
    using rebind_traits = allocator_traits<rebind_alloc<T>>;
    static constexpr pointer allocate(Alloc& a, size_type n);
    static constexpr pointer allocate(Alloc& a, size_type n, const_void_pointer hint);
    static constexpr allocation_result<pointer, size_type> allocate_at_least(Alloc& a,
                                                                             size_type n);
    static constexpr void deallocate(Alloc& a, pointer p, size_type n);
    template<class T, class... Args>
    static constexpr void construct(Alloc& a, T* p, Args&&... args);
    template<class T>
    static constexpr void destroy(Alloc& a, T* p);
    static constexpr size_type max_size(const Alloc& a) noexcept;
    static constexpr Alloc select_on_container_copy_construction(const Alloc& rhs);
  };
}

Klassentemplate std::allocator

namespace std {
  template<class T>
  class allocator
  {
  public:
    using value_type                             = T;
    using size_type                              = size_t;
    using difference_type                        = ptrdiff_t;
    using propagate_on_container_move_assignment = true_type;
    constexpr allocator() noexcept;
    constexpr allocator(const allocator&) noexcept;
    template<class U>
    constexpr allocator(const allocator<U>&) noexcept;
    constexpr ~allocator();
    constexpr allocator& operator=(const allocator&) = default;
    constexpr T* allocate(size_t n);
    constexpr allocation_result<T*> allocate_at_least(size_t n);
    constexpr void deallocate(T* p, size_t n);
  };
}
**Anmerkung:** Der C++-Code wurde gemäß den Anforderungen nicht übersetzt, da er sich innerhalb von `
`-Tags befindet und C++-spezifische Begriffe enthält. Die HTML-Struktur und Formatierung wurden vollständig beibehalten.

Klassentemplate std::default_delete

namespace std {
  template<class T>
  struct default_delete
  {
    constexpr default_delete() noexcept = default;
    template<class U>
    constexpr default_delete(const default_delete<U>&) noexcept;
    constexpr void operator()(T*) const;
  };
  template<class T>
  struct default_delete<T[]>
  {
    constexpr default_delete() noexcept = default;
    template<class U>
    constexpr default_delete(const default_delete<U[]>&) noexcept;
    template<class U>
    constexpr void operator()(U* ptr) const;
  };
}

Klassentemplate std::unique_ptr

namespace std {
  template<class T, class D = default_delete<T>>
  class unique_ptr
  {
  public:
    using pointer      = /* siehe Beschreibung */;
    using element_type = T;
    using deleter_type = D;
    // Konstruktoren
    constexpr unique_ptr() noexcept;
    constexpr explicit unique_ptr(type_identity_t<pointer> p) noexcept;
    constexpr unique_ptr(type_identity_t<pointer> p, /* siehe Beschreibung */ d1) noexcept;
    constexpr unique_ptr(type_identity_t<pointer> p, /* siehe Beschreibung */ d2) noexcept;
    constexpr unique_ptr(unique_ptr&& u) noexcept;
    constexpr unique_ptr(nullptr_t) noexcept;
    template<class U, class E>
    constexpr unique_ptr(unique_ptr<U, E>&& u) noexcept;
    // Destruktor
    constexpr ~unique_ptr();
    // Zuweisung
    constexpr unique_ptr& operator=(unique_ptr&& u) noexcept;
    template<class U, class E>
    constexpr unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept;
    constexpr unique_ptr& operator=(nullptr_t) noexcept;
    // Beobachter
    constexpr add_lvalue_reference_t<T> operator*() const noexcept(/* siehe Beschreibung */);
    constexpr pointer operator->() const noexcept;
    constexpr pointer get() const noexcept;
    constexpr deleter_type& get_deleter() noexcept;
    constexpr const deleter_type& get_deleter() const noexcept;
    constexpr explicit operator bool() const noexcept;
    // Modifikatoren
    constexpr pointer release() noexcept;
    constexpr void reset(pointer p = pointer()) noexcept;
    constexpr void swap(unique_ptr& u) noexcept;
    // Kopieren von Lvalue deaktivieren
    unique_ptr(const unique_ptr&)            = delete;
    unique_ptr& operator=(const unique_ptr&) = delete;
  };
  template<class T, class D>
  class unique_ptr<T[], D>
  {
  public:
    using pointer      = /* siehe Beschreibung */;
    using element_type = T;
    using deleter_type = D;
    // Konstruktoren
    constexpr unique_ptr() noexcept;
    template<class U>
    constexpr explicit unique_ptr(U p) noexcept;
    template<class U>
    constexpr unique_ptr(U p, /* siehe Beschreibung */ d) noexcept;
    template<class U>
    constexpr unique_ptr(U p, /* siehe Beschreibung */ d) noexcept;
    constexpr unique_ptr(unique_ptr&& u) noexcept;
    template<class U, class E>
    constexpr unique_ptr(unique_ptr<U, E>&& u) noexcept;
    constexpr unique_ptr(nullptr_t) noexcept;
    // Destruktor
    constexpr ~unique_ptr();
    // Zuweisung
    constexpr unique_ptr& operator=(unique_ptr&& u) noexcept;
    template<class U, class E>
    constexpr unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept;
    constexpr unique_ptr& operator=(nullptr_t) noexcept;
    // Beobachter
    constexpr T& operator[](size_t i) const;
    constexpr pointer get() const noexcept;
    constexpr deleter_type& get_deleter() noexcept;
    constexpr const deleter_type& get_deleter() const noexcept;
    constexpr explicit operator bool() const noexcept;
    // Modifikatoren
    constexpr pointer release() noexcept;
    template<class U>
    constexpr void reset(U p) noexcept;
    constexpr void reset(nullptr_t = nullptr) noexcept;
    constexpr void swap(unique_ptr& u) noexcept;
    // Kopieren von Lvalue deaktivieren
    unique_ptr(const unique_ptr&)            = delete;
    unique_ptr& operator=(const unique_ptr&) = delete;
  };
}

Klasse std::bad_weak_ptr

namespace std {
  class bad_weak_ptr : public exception
  {
  public:
    // für die Spezifikation der speziellen Elementfunktionen
    const char* what() const noexcept override;
  };
}

Klassentemplate std::shared_ptr

namespace std {
  template<class T>
  class shared_ptr
  {
  public:
    using element_type = remove_extent_t<T>;
    using weak_type    = weak_ptr<T>;
    // Konstruktoren
    constexpr shared_ptr() noexcept;
    constexpr shared_ptr(nullptr_t) noexcept
      : shared_ptr()
    {
    }
    template<class Y>
    explicit shared_ptr(Y* p);
    template<class Y, class D>
    shared_ptr(Y* p, D d);
    template<class Y, class D, class A>
    shared_ptr(Y* p, D d, A a);
    template<class D>
    shared_ptr(nullptr_t p, D d);
    template<class D, class A>
    shared_ptr(nullptr_t p, D d, A a);
    template<class Y>
    shared_ptr(const shared_ptr<Y>& r, element_type* p) noexcept;
    template<class Y>
    shared_ptr(shared_ptr<Y>&& r, element_type* p) noexcept;
    shared_ptr(const shared_ptr& r) noexcept;
    template<class Y>
    shared_ptr(const shared_ptr<Y>& r) noexcept;
    shared_ptr(shared_ptr&& r) noexcept;
    template<class Y>
    shared_ptr(shared_ptr<Y>&& r) noexcept;
    template<class Y>
    explicit shared_ptr(const weak_ptr<Y>& r);
    template<class Y, class D>
    shared_ptr(unique_ptr<Y, D>&& r);
    // Destruktor
    ~shared_ptr();
    // Zuweisung
    shared_ptr& operator=(const shared_ptr& r) noexcept;
    template<class Y>
    shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
    shared_ptr& operator=(shared_ptr&& r) noexcept;
    template<class Y>
    shared_ptr& operator=(shared_ptr<Y>&& r) noexcept;
    template<class Y, class D>
    shared_ptr& operator=(unique_ptr<Y, D>&& r);
    // Modifikatoren
    void swap(shared_ptr& r) noexcept;
    void reset() noexcept;
    template<class Y>
    void reset(Y* p);
    template<class Y, class D>
    void reset(Y* p, D d);
    template<class Y, class D, class A>
    void reset(Y* p, D d, A a);
    // Beobachter
    element_type* get() const noexcept;
    T& operator*() const noexcept;
    T* operator->() const noexcept;
    element_type& operator[](ptrdiff_t i) const;
    long use_count() const noexcept;
    explicit operator bool() const noexcept;
    template<class U>
    bool owner_before(const shared_ptr<U>& b) const noexcept;
    template<class U>
    bool owner_before(const weak_ptr<U>& b) const noexcept;
    size_t owner_hash() const noexcept;
    template<class U>
    bool owner_equal(const shared_ptr<U>& b) const noexcept;
    template<class U>
    bool owner_equal(const weak_ptr<U>& b) const noexcept;
  };
  template<class T>
  shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
  template<class T, class D>
  shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;
}

Klassentemplate std::weak_ptr

namespace std {
  template<class T>
  class weak_ptr
  {
  public:
    using element_type = remove_extent_t<T>;
    // Konstruktoren
    constexpr weak_ptr() noexcept;
    template<class Y>
    weak_ptr(const shared_ptr<Y>& r) noexcept;
    weak_ptr(const weak_ptr& r) noexcept;
    template<class Y>
    weak_ptr(const weak_ptr<Y>& r) noexcept;
    weak_ptr(weak_ptr&& r) noexcept;
    template<class Y>
    weak_ptr(weak_ptr<Y>&& r) noexcept;
    // Destruktor
    ~weak_ptr();
    // Zuweisung
    weak_ptr& operator=(const weak_ptr& r) noexcept;
    template<class Y>
    weak_ptr& operator=(const weak_ptr<Y>& r) noexcept;
    template<class Y>
    weak_ptr& operator=(const shared_ptr<Y>& r) noexcept;
    weak_ptr& operator=(weak_ptr&& r) noexcept;
    template<class Y>
    weak_ptr& operator=(weak_ptr<Y>&& r) noexcept;
    // Modifikatoren
    void swap(weak_ptr& r) noexcept;
    void reset() noexcept;
    // Beobachter
    long use_count() const noexcept;
    bool expired() const noexcept;
    shared_ptr<T> lock() const noexcept;
    template<class U>
    bool owner_before(const shared_ptr<U>& b) const noexcept;
    template<class U>
    bool owner_before(const weak_ptr<U>& b) const noexcept;
    size_t owner_hash() const noexcept;
    template<class U>
    bool owner_equal(const shared_ptr<U>& b) const noexcept;
    template<class U>
    bool owner_equal(const weak_ptr<U>& b) const noexcept;
  };
  template<class T>
  weak_ptr(shared_ptr<T>) -> weak_ptr<T>;
}

Klassentemplate std::owner_less

namespace std {
  template<class T = void>
  struct owner_less;
  template<class T>
  struct owner_less<shared_ptr<T>>
  {
    bool operator()(const shared_ptr<T>&, const shared_ptr<T>&) const noexcept;
    bool operator()(const shared_ptr<T>&, const weak_ptr<T>&) const noexcept;
    bool operator()(const weak_ptr<T>&, const shared_ptr<T>&) const noexcept;
  };
  template<class T>
  struct owner_less<weak_ptr<T>>
  {
    bool operator()(const weak_ptr<T>&, const weak_ptr<T>&) const noexcept;
    bool operator()(const shared_ptr<T>&, const weak_ptr<T>&) const noexcept;
    bool operator()(const weak_ptr<T>&, const shared_ptr<T>&) const noexcept;
  };
  template<>
  struct owner_less<void>
  {
    template<class T, class U>
    bool operator()(const shared_ptr<T>&, const shared_ptr<U>&) const noexcept;
    template<class T, class U>
    bool operator()(const shared_ptr<T>&, const weak_ptr<U>&) const noexcept;
    template<class T, class U>
    bool operator()(const weak_ptr<T>&, const shared_ptr<U>&) const noexcept;
    template<class T, class U>
    bool operator()(const weak_ptr<T>&, const weak_ptr<U>&) const noexcept;
    using is_transparent = /* nicht spezifiziert */;
  };
}

Klasse std::owner_hash

namespace std {
  struct owner_hash
  {
    template<class T>
    size_t operator()(const shared_ptr<T>&) const noexcept;
    template<class T>
    size_t operator()(const weak_ptr<T>&) const noexcept;
    using is_transparent = /* nicht spezifiziert */;
  };
}

Klasse std::owner_equal

namespace std {
  struct owner_equal
  {
    template<class T, class U>
    bool operator()(const shared_ptr<T>&, const shared_ptr<U>&) const noexcept;
    template<class T, class U>
    bool operator()(const shared_ptr<T>&, const weak_ptr<U>&) const noexcept;
    template<class T, class U>
    bool operator()(const weak_ptr<T>&, const shared_ptr<U>&) const noexcept;
    template<class T, class U>
    bool operator()(const weak_ptr<T>&, const weak_ptr<U>&) const noexcept;
    using is_transparent = /* nicht spezifiziert */;
  };
}

Klassentemplate std::enable_shared_from_this

namespace std {
  template<class T>
  class enable_shared_from_this
  {
  protected:
    constexpr enable_shared_from_this() noexcept;
    enable_shared_from_this(const enable_shared_from_this&) noexcept;
    enable_shared_from_this& operator=(const enable_shared_from_this&) noexcept;
    ~enable_shared_from_this();
  public:
    shared_ptr<T> shared_from_this();
    shared_ptr<T const> shared_from_this() const;
    weak_ptr<T> weak_from_this() noexcept;
    weak_ptr<T const> weak_from_this() const noexcept;
  private:
    mutable weak_ptr<T> /*weak-this*/; // nur zur Darstellung
  };
}

Klassentemplate std::atomic -Spezialisierung für std::shared_ptr

namespace std {
  template<class T> struct atomic<shared_ptr<T>> {
    using value_type = shared_ptr<T>;
    static constexpr bool is_always_lock_free = /* implementierungsdefiniert */;
    bool is_lock_free() const noexcept;
    void store(shared_ptr<T> desired, memory_order order = memory_order::seq_cst) noexcept;
    shared_ptr<T> load(memory_order order = memory_order::seq_cst) const noexcept;
    operator shared_ptr<T>() const noexcept;
    shared_ptr<T> exchange(shared_ptr<T> desired,
                           memory_order order = memory_order::seq_cst) noexcept;
    bool compare_exchange_weak(shared_ptr<T>& expected, shared_ptr<T> desired,
                               memory_order success, memory_order failure) noexcept;
    bool compare_exchange_strong(shared_ptr<T>& expected, shared_ptr<T> desired,
                                 memory_order success, memory_order failure) noexcept;
    bool compare_exchange_weak(shared_ptr<T>& expected, shared_ptr<T> desired,
                               memory_order order = memory_order::seq_cst) noexcept;
    bool compare_exchange_strong(shared_ptr<T>& expected, shared_ptr<T> desired,
                                 memory_order order = memory_order::seq_cst) noexcept;
    constexpr atomic() noexcept = default;
    atomic(shared_ptr<T> desired) noexcept;
    atomic(const atomic&) = delete;
    void operator=(const atomic&) = delete;
    void operator=(shared_ptr<T> desired) noexcept;
  private:
    shared_ptr<T> p;            // nur zur Veranschaulichung
  };
}

Klassentemplate std::atomic -Spezialisierung für std::weak_ptr

namespace std {
  template<class T> struct atomic<weak_ptr<T>> {
    using value_type = weak_ptr<T>;
    static constexpr bool is_always_lock_free = /* implementierungsdefiniert */;
    bool is_lock_free() const noexcept;
    void store(weak_ptr<T> desired, memory_order order = memory_order::seq_cst) noexcept;
    weak_ptr<T> load(memory_order order = memory_order::seq_cst) const noexcept;
    operator weak_ptr<T>() const noexcept;
    weak_ptr<T> exchange(weak_ptr<T> desired,
                         memory_order order = memory_order::seq_cst) noexcept;
    bool compare_exchange_weak(weak_ptr<T>& expected, weak_ptr<T> desired,
                               memory_order success, memory_order failure) noexcept;
    bool compare_exchange_strong(weak_ptr<T>& expected, weak_ptr<T> desired,
                                 memory_order success, memory_order failure) noexcept;
    bool compare_exchange_weak(weak_ptr<T>& expected, weak_ptr<T> desired,
                               memory_order order = memory_order::seq_cst) noexcept;
    bool compare_exchange_strong(weak_ptr<T>& expected, weak_ptr<T> desired,
                                 memory_order order = memory_order::seq_cst) noexcept;
    constexpr atomic() noexcept = default;
    atomic(weak_ptr<T> desired) noexcept;
    atomic(const atomic&) = delete;
    void operator=(const atomic&) = delete;
    void operator=(weak_ptr<T> desired) noexcept;
  private:
    weak_ptr<T> p;              // nur zur Darstellung
  };
}

Klassentemplate std:: out_ptr_t

namespace std {
  template<class Smart, class Pointer, class... Args>
  class out_ptr_t
  {
  public:
    explicit out_ptr_t(Smart&, Args...);
    out_ptr_t(const out_ptr_t&) = delete;
    ~out_ptr_t();
    operator Pointer*() const noexcept;
    operator void**() const noexcept;
  private:
    Smart& s;         // Nur zur Darstellung
    tuple<Args...> a; // Nur zur Darstellung
    Pointer p;        // Nur zur Darstellung
  };
}

Klassentemplate std:: inout_ptr_t

namespace std {
  template<class Smart, class Pointer, class... Args>
  class inout_ptr_t
  {
  public:
    explicit inout_ptr_t(Smart&, Args...);
    inout_ptr_t(const inout_ptr_t&) = delete;
    ~inout_ptr_t();
    operator Pointer*() const noexcept;
    operator void**() const noexcept;
  private:
    Smart& s;         // nur zur Darstellung
    tuple<Args...> a; // nur zur Darstellung
    Pointer p;        // nur zur Darstellung
  };
}

Klassentemplate std :: indirect

namespace std {
  template<class T, class Allocator = allocator<T>>
  class indirect
  {
  public:
    using value_type     = T;
    using allocator_type = Allocator;
    using pointer        = typename allocator_traits<Allocator>::pointer;
    using const_pointer  = typename allocator_traits<Allocator>::const_pointer;
    // Konstruktoren
    constexpr explicit indirect();
    constexpr explicit indirect(allocator_arg_t, const Allocator& a);
    constexpr indirect(const indirect& other);
    constexpr indirect(allocator_arg_t, const Allocator& a, const indirect& other);
    constexpr indirect(indirect&& other) noexcept;
    constexpr indirect(allocator_arg_t,
                       const Allocator& a,
                       indirect&& other) noexcept(/* siehe Beschreibung */);
    template<class U = T>
    constexpr explicit indirect(U&& u);
    template<class U = T>
    constexpr explicit indirect(allocator_arg_t, const Allocator& a, U&& u);
    template<class... Uns>
    constexpr explicit indirect(in_place_t, Us&&... us);
    template<class... Uns>
    constexpr explicit indirect(allocator_arg_t,
                                const Allocator& a,
                                in_place_t,
                                Us&&... us);
    template<class I, class... Us>
    constexpr explicit indirect(in_place_t, initializer_list<I> ilist, Us&&... us);
    template<class I, class... Uns>
    constexpr explicit indirect(allocator_arg_t,
                                const Allocator& a,
                                in_place_t,
                                initializer_list<I> ilist,
                                Us&&... us);
    // Destruktor
    constexpr ~indirect();
    // Zuweisung
    constexpr indirect& operator=(const indirect& other);
    constexpr indirect& operator=(indirect&& other) noexcept(/* siehe Beschreibung */);
    template<class U = T>
    constexpr indirect& operator=(U&& u);
    // Beobachter
    constexpr const T& operator*() const& noexcept;
    constexpr T& operator*() & noexcept;
    constexpr const T&& operator*() const&& noexcept;
    constexpr T&& operator*() && noexcept;
    constexpr const_pointer operator->() const noexcept;
    constexpr pointer operator->() noexcept;
    constexpr bool valueless_after_move() const noexcept;
    constexpr allocator_type get_allocator() const noexcept;
    // swap
    constexpr void swap(indirect& other) noexcept(/* siehe Beschreibung */);
    friend constexpr void swap(indirect& lhs,
                               indirect& rhs) noexcept(/* siehe Beschreibung */);
    // relational operators
    template<class U, class AA>
    friend constexpr bool operator==(
      const indirect& lhs,
      const indirect<U, AA>& rhs) noexcept(/* siehe Beschreibung */);
    template<class U, class AA>
    friend constexpr auto operator<=>(const indirect& lhs, const indirect<U, AA>& rhs)
      -> /*synth-three-way-result*/<T, U>;
    // Vergleich mit T
    template<class U>
    friend constexpr bool operator==(const indirect& lhs,
                                     const U& rhs) noexcept(/* siehe Beschreibung */);
    template<class U>
    friend constexpr auto operator<=>(const indirect& lhs, const U& rhs)
      -> /*synth-three-way-result*/<T, U>;
  private:
    pointer /*p*/;                     // exposition-only
    Allocator /*alloc*/ = Allocator(); // exposition-only
  };
  template<class Value>
  indirect(Value) -> indirect<Value>;
  template<class Allocator, class Value>
  indirect(allocator_arg_t, Allocator, Value)
    -> indirect<Value,
                typename allocator_traits<Allocator>::template rebind_alloc<Value>>;
}

Klassentemplate std :: polymorphic

namespace std {
  template<class T, class Allocator = allocator<T>>
  class polymorphic
  {
  public:
    using value_type     = T;
    using allocator_type = Allocator;
    using pointer        = typename allocator_traits<Allocator>::pointer;
    using const_pointer  = typename allocator_traits<Allocator>::const_pointer;
    // Konstruktoren
    constexpr explicit polymorphic();
    constexpr explicit polymorphic(allocator_arg_t, const Allocator& a);
    constexpr polymorphic(const polymorphic& other);
    constexpr polymorphic(allocator_arg_t, const Allocator& a, const polymorphic& other);
    constexpr polymorphic(polymorphic&& other) noexcept;
    constexpr polymorphic(allocator_arg_t,
                          const Allocator& a,
                          polymorphic&& other) noexcept(/* siehe Beschreibung */);
    template<class U = T>
    constexpr explicit polymorphic(U&& u);
    template<class U = T>
    constexpr explicit polymorphic(allocator_arg_t, const Allocator& a, U&& u);
    template<class U, class... Ts>
    constexpr explicit polymorphic(in_place_type_t<U>, Ts&&... ts);
    template<class U, class... Ts>
    constexpr explicit polymorphic(allocator_arg_t,
                                   const Allocator& a,
                                   in_place_type_t<U>,
                                   Ts&&... ts);
    template<class U, class I, class... Us>
    constexpr explicit polymorphic(in_place_type_t<U>,
                                   initializer_list<I> ilist,
                                   Us&&... us);
    template<class U, class I, class... Us>
    constexpr explicit polymorphic(allocator_arg_t,
                                   const Allocator& a,
                                   in_place_type_t<U>,
                                   initializer_list<I> ilist,
                                   Us&&... us);
    // Destruktor
    constexpr ~polymorphic();
    // Zuweisung
    constexpr polymorphic& operator=(const polymorphic& other);
    constexpr polymorphic& operator=(polymorphic&& other) noexcept(/* siehe Beschreibung */);
    // Beobachter
    constexpr const T& operator*() const noexcept;
    constexpr T& operator*() noexcept;
    constexpr const_pointer operator->() const noexcept;
    constexpr pointer operator->() noexcept;
    constexpr bool valueless_after_move() const noexcept;
    constexpr allocator_type get_allocator() const noexcept;
    // Austausch
    constexpr void swap(polymorphic& other) noexcept(/* siehe Beschreibung */);
    friend constexpr void swap(polymorphic& lhs,
                               polymorphic& rhs) noexcept(/* siehe Beschreibung */);
  private:
    Allocator /*alloc*/ = Allocator(); // nur zur Darstellung
  };
}