allocatorObject

fnRCIAllocator allocatorObject(A)(auto ref A a) if (!isPointer!A)

Returns a dynamically-typed CAllocator built around a given statically- typed allocator a of type A. Passing a pointer to the allocator creates a dynamic allocator around the allocator pointed to by the pointer, without attempting to copy or move it. Passing the allocator by value or reference behaves as follows.

  • If A has no state, the resulting object is allocated in static

    shared storage.

  • If A has state, the result will move

    the supplied allocator A a within. The result itself is allocated in its own statically-typed allocator.

fnRCIAllocator allocatorObject(A)(A * pa)

Ditto