RefCountedNoGC.refCountedPayload

Returns a reference to the payload. If (autoInit == RefCountedAutoInitialize.yes), calls refCountedStore.ensureInitialized. Otherwise, just issues assert(refCountedStore.isInitialized). Used with alias refCountedPayload this;, so callers can just use the RefCountedNoGC object as a T.

The first overload exists only if autoInit == RefCountedAutoInitialize.yes. So if autoInit == RefCountedAutoInitialize.no or called for a constant or immutable object, then refCountedPayload will also be qualified as safe and nothrow (but will still assert if not initialized).

  1. T refCountedPayload [@property getter]
  2. inout(T) refCountedPayload [@property getter]
    struct RefCountedNoGC(T, RefCountedAutoInitialize autoInit = RefCountedAutoInitialize.yes)
    version(StdDdoc)@property nothrow @safe ref
    inout(T)
    refCountedPayload
    inout
    (
    )
    if (
    !is(T == class)
    )

Meta