C++20 allocator
-
Hey.
Ich hab gerade gesehen, dass allocator sich in C++20 (schon wieder) ändern soll...
https://en.cppreference.com/w/cpp/memory/allocator
Speziell geht es mir um construct bzw destroy:
https://en.cppreference.com/w/cpp/memory/allocator/constructWer ruft dann placement new und DTor auf? Oder kommen die "until C++11" Signaturen wieder?
Danke
-
@unskilled sagte in C++20 allocator:
Wer ruft dann placement new und DTor auf?
Entweder du selbst oder
std::allocator_traits<allocator<T>>::construct/destroy
. Siehe auch hier:Many members of std::allocator redundantly duplicate behavior that is otherwise produced by std::allocator_traits<allocator<T>>, and could safely be removed to simplify this class.
Gruss,
Finnegan