std.typecons

This module implements a variety of type constructors, i.e., templates that allow construction of new, useful general-purpose types.

Constructors

this
this()
Undocumented in source.
this
this(T value)

Constructs a Rebindable from a given value.

this
this()
Undocumented in source.
this
this(T value)

Constructs a Rebindable2 from a given value.

Destructor

~this
~this()
Undocumented in source.

Alias This

get

Members

Enums

isTuple
eponymoustemplate isTuple(T)

Returns true if and only if T is an instance of std.typecons.Tuple.

Functions

get
T get()

Returns the value currently stored in the Rebindable.

get
T get()
inout(T) get()

Returns the value currently stored in the Rebindable2.

opAssign
void opAssign(T value)

Overwrites the currently stored value with value.

opAssign
void opAssign(T value)

Overwrites the currently stored value with value.

rebindable2
Rebindable2!T rebindable2(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
reverse
auto reverse(T t)

Creates a copy of a Tuple with its fields in reverse order.

Structs

Rebindable
struct Rebindable(T)

Rebindable!(T) is a simple, efficient wrapper that behaves just like an object of type T, except that you can reassign it to refer to another object. For completeness, Rebindable!(T) aliases itself away to T if T is a non-const object type.

Rebindable2
struct Rebindable2(T)
Undocumented in source.
Unique
struct Unique(T)

Encapsulates unique ownership of a resource.

Templates

Bind
template Bind(alias Template, args1...)
Undocumented in source.
DerivedFunctionType
template DerivedFunctionType(T...)
Undocumented in source.
FuncInfo
template FuncInfo(alias func)
Undocumented in source.
FuncInfo
template FuncInfo(Func)
Undocumented in source.
GetOverloadedMethods
template GetOverloadedMethods(T)
Undocumented in source.
MemberFunctionGenerator
template MemberFunctionGenerator(alias Policy)
Undocumented in source.
OverloadSet
template OverloadSet(string nam, T...)
Undocumented in source.
Rebindable
template Rebindable(T)

Rebindable!(T) is a simple, efficient wrapper that behaves just like an object of type T, except that you can reassign it to refer to another object. For completeness, Rebindable!(T) aliases itself away to T if T is a non-const object type.

Tuple
template Tuple(Specs...)

Tuple of values, for example Tuple!(int, string) is a record that stores an int and a string. Tuple can be used to bundle values together, notably when returning multiple values from a function. If obj is a Tuple, the individual members are accessible with the syntax obj[0] for the first field, obj[1] for the second, and so on.

tuple
template tuple(Names...)

Constructs a Tuple object instantiated and initialized according to the given arguments.

Variables

data
Payload data;
Undocumented in source.

Meta

Authors

Andrei Alexandrescu, Bartosz Milewski, Don Clugston, Shin Fujishiro, Kenji Hara