All Allocator Traits and Pointer Helpers
All Allocator Traits and Pointer Helpers
A compact scan page for allocator_traits, pointer access helpers, address utilities, and allocation-adjacent support types.
All Allocator Traits and Pointer Helpers
A compact scan page for allocator_traits, pointer access helpers, address utilities, and allocation-adjacent support types.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
std::allocator_traitsstd::addressofstd::to_addresspointer_traitsstd::allocator<T>std::polymorphic_allocator<T> in the PMR namespacestd::allocate_sharedstd::allocate_shared_for_overwriteto_address over hand-written raw-pointer extraction from fancy pointersallocator_traits mediate allocator behavior instead of assuming a specific allocator interface shape#include <memory>
int main() {
auto owner = std::make_unique<int>(42);
auto shared = std::make_shared<int>(*owner);
owner.reset();
return *shared;
}