rebindable

fnRebindable!T rebindable(T)(T obj) if (is(T == class) || is(T == interface) || isDynamicArray!T || isAssociativeArray!T)

Convenience function for creating a Rebindable using automatic type inference.

Parameters

objA reference to a value to initialize the Rebindable with.

Returns

A newly constructed Rebindable initialized with the given reference.
fnRebindable!T rebindable(T)(T value) if (!is(T == class) && !is(T == interface) && !isDynamicArray!T && !isAssociativeArray!T && !is(T : Rebindable!U, U))

ditto

fnRebindable!T rebindable(T)(Rebindable!T obj)

This function simply returns the Rebindable object passed in. It's useful in generic programming cases when a given object may be either a regular class or a Rebindable.

Parameters

objAn instance of Rebindable!T.

Returns

obj without any modification.