RefCounted.construct

Factory method to enable construction of structs despite structs not being able to have a constructor with no arguments.

  1. typeof(this) construct(Args args)
    struct RefCounted(RefCountedType, Allocator = typeof(theAllocator), Flag!"supportGC" supportGC = gcExists ? Flag!"supportGC".yes : Flag!"supportGC".no)
    static
    static if(isGlobal)
    typeof(this)
    construct
    (
    Args...
    )
    (
    auto ref Args args
    )
    if (
    isAllocator!Allocator
    )
  2. typeof(this) construct(Allocator allocator, Args args)

Meta