[GSOC] Database API

KennyTM~ kennytm at gmail.com
Sat Mar 26 16:16:18 PDT 2011


On Mar 27, 11 03:11, Piotr Szturmaj wrote:
> I propose that, Nullable should be an alias (or subtype) of Algebraic,
> for example:
>
> template Nullable(T)
> {
>      alias Algebraic!(T, void*) Nullable;
> }
>
> This way it will share the same backend as Variant, so both types will
> be compatible.

template Nullable(T) if (!__traits(compiles, {T a=null;}) { ... }

I don't think it makes sense to Nullable something that can already take 
null.


More information about the Digitalmars-d mailing list