View source code
Display the source code in std/typecons.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Struct std.typecons.NullableRef
Just like
, except that the Nullable
!Tobject
refers to a value
sitting elsewhere in memory. This makes assignments overwrite the
initially assigned value. Internally
only stores a
pointer to NullableRef
!TT
(i.e.,
).
Nullable
!T.sizeof == (T*).sizeof
Constructors
Name | Description |
---|---|
this
|
Constructor binding this to .
|
Properties
Name | Type | Description |
---|---|---|
get
[get]
|
inout(T) |
Gets the value. this must not be in the null state.
This function is also called for the implicit conversion to T .
|
isNull
[get]
|
bool |
Returns true if and only if this is in the null state.
|
Methods
Name | Description |
---|---|
bind
|
Binds the internal state to .
|
nullify
|
Forces this to the null state.
|
Templates
Name | Description |
---|---|
opAssign
|
Assigns value to the internally-held state.
|
Authors
Andrei Alexandrescu, Bartosz Milewski, Don Clugston, Shin Fujishiro, Kenji Hara