sharedAllocatorObject

Returns a dynamically-typed CSharedAllocator 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 and is copyable, the result will store a copy of it within. The result itself is allocated in its own statically-typed allocator.
  • If A has state and is not copyable, the result will move the passed-in argument into the result. The result itself is allocated in its own statically-typed allocator.
  1. shared(CSharedAllocatorImpl!A) sharedAllocatorObject(A a)
    version(HasDRuntime)
    sharedAllocatorObject
    (
    A
    )
    (
    auto ref A a
    )
    if (
    !isPointer!A
    )
  2. shared(CSharedAllocatorImpl!(A, Yes.indirect)) sharedAllocatorObject(A* pa)

Meta