Function std.typecons.RefCounted.refCountedPayload
Returns a reference to the payload. If (autoInit ==
RefCountedAutoInitialize.yes
), calls refCountedStore.ensureInitialized
. Otherwise, just issues assert(refCountedStore.isInitialized)
. Used with alias
, so callers can just use the refCountedPayload
this;RefCounted
object
as a T
.
The first overload exists only if autoInit ==
.
So if RefCountedAutoInitialize.yes
autoInit ==
or called for a constant or immutable RefCountedAutoInitialize.no
object
, then
will also be qualified as safe and nothrow
(but will still assert if not initialized).
refCountedPayload
Prototypes
ref T refCountedPayload() @property; inout ref inout(T) refCountedPayload() nothrow @property @safe;
Authors
Andrei Alexandrescu, Bartosz Milewski, Don Clugston, Shin Fujishiro, Kenji Hara