Custom versions of std.experimental.allocator functions (unfortunately)
Aliases for automem.vector
A reference-counted smart pointer.
A unique pointer.
Dynamic arrays with deterministic memory usage akin to C++'s std::vector or Rust's std::vec::Vec
Create a vector from an input range, inferring the type of the elements and the allocator.
C++-style automatic memory management smart pointers for D using std.experimental.allocator.
Unlike the C++ variants, the smart pointers themselves allocate the memory for the objects they contain. That ensures the right allocator is used to dispose of the memory as well.
Allocators are template arguments instead of using theAllocator so that these smart pointers can be used in @nogc code. However, they will default to typeof(theAllocator) for simplicity.
Another reason to have to pass in the type of allocator is to decide how it is to be stored. Stateless allocators can be "stored" by value and imply zero-cost Unique pointers. Singleton allocators such as Mallocator (that have an instance attribute/member function) don't need to be passed in to the constructor. This is detected at compile-time as an example of design by instrospection.
RefCounted leverages D's type system by doing atomic reference counting *iff* the type of the contained object is shared. Otherwise it's non-atomic.