std.typecons.Nullable/nullable  - multiple declarations
				Function nullable
Defines a value paired with a distinctive "null" state that denotes
the absence of a value. If default constructed, a Nullable!T object starts in the null state. Assigning it renders it
non-null. Calling nullify can nullify it again.
						
				auto auto nullable(T)
				(
				
				  T t
				
				);
						
					
				Practically Nullable!T stores a T and a bool.
Example
struct CustomerRecord
{
    string name;
    string address;
    int customerNum;
}
Nullable!CustomerRecord getByName(string name)
{
    //A bunch of hairy stuff
    return Nullable!CustomerRecordExample
import stdFunction nullable
Just like Nullable!T, except that the null state is defined as a
particular value. For example, Nullable!(uint, uint is an
uint that sets aside the value uint to denote a null
state. Nullable!(T, nullValue) is more storage-efficient than Nullable!T because it does not need to store an extra bool.
						
				auto auto nullable(alias nullValue, T)
				(
				
				  T t
				
				)
				
				if (is(typeof(nullValue) == T));
						
					
				Parameters
| Name | Description | 
|---|---|
| T | The wrapped type for which Nullable provides a null value. | 
| nullValue | The null value which denotes the null state of this Nullable. Must be of typeT. | 
Example
Nullable!(size_t, size_tExample
import stdExample
auto a = nullable!(intStruct Nullable
Defines a value paired with a distinctive "null" state that denotes
the absence of a value. If default constructed, a Nullable!T object starts in the null state. Assigning it renders it
non-null. Calling nullify can nullify it again.
						
				struct Nullable(T)
				;
						
					
				Practically Nullable!T stores a T and a bool.
Constructors
| Name | Description | 
|---|---|
| this | Constructor initializing thiswithvalue. | 
Properties
| Name | Type | Description | 
|---|---|---|
| get[get, set] | inout(T) | Gets the value if not null. If thisis in the null state, and the optional
 parameterfallbackwas provided, it will be returned. Withoutfallback,
 callinggetwith a null state is invalid. | 
| isNull[get] | bool | Check if thisis in the null state. | 
Methods
| Name | Description | 
|---|---|
| nullify | Forces thisto the null state. | 
| opAssign | Assigns valueto the internally-held state. If the assignment
 succeeds,thisbecomes non-null. | 
| opEquals | If they are both null, then they are equal. If one is null and the other is not, then they are not equal. If they are both non-null, then they are equal if their values are equal. | 
| toString | Gives the string "Nullable.null"ifisNullistrue. Otherwise, the
 result is equivalent to callingformattedWriteon the
 underlying value. | 
Example
struct CustomerRecord
{
    string name;
    string address;
    int customerNum;
}
Nullable!CustomerRecord getByName(string name)
{
    //A bunch of hairy stuff
    return Nullable!CustomerRecordExample
import stdStruct Nullable
Just like Nullable!T, except that the null state is defined as a
particular value. For example, Nullable!(uint, uint is an
uint that sets aside the value uint to denote a null
state. Nullable!(T, nullValue) is more storage-efficient than Nullable!T because it does not need to store an extra bool.
						
				struct Nullable(T, T nullValue)
				;
						
					
				Constructors
| Name | Description | 
|---|---|
| this | Constructor initializing thiswithvalue. | 
Properties
| Name | Type | Description | 
|---|---|---|
| get[get] | inout(T) | Gets the value. thismust not be in the null state.
This function is also called for the implicit conversion toT. | 
| isNull[get] | bool | Check if thisis in the null state. | 
Methods
| Name | Description | 
|---|---|
| nullify | Forces thisto the null state. | 
| opAssign | Assigns valueto the internally-held state. If the assignment
succeeds,thisbecomes non-null. No null checks are made. Note
that the assignment may leavethisin the null state. | 
Parameters
| Name | Description | 
|---|---|
| T | The wrapped type for which Nullable provides a null value. | 
| nullValue | The null value which denotes the null state of this Nullable. Must be of typeT. | 
Example
Nullable!(size_t, size_tExample
import stdExample
auto a = nullable!(intAuthors
Andrei Alexandrescu, Bartosz Milewski, Don Clugston, Shin Fujishiro, Kenji Hara