On Friday, 24 May 2013 at 13:49:14 UTC, Max Samukha wrote:
On Friday, 24 May 2013 at 13:05:36 UTC, bearophile wrote:
Max Samukha:

Note that the Nullable is not phobos Nullable -
the latter incurs unnecessary overhead for types that are already nullable.

In Bugzilla I have suggested some improvements for Nullable, but in Phobos there is already an alternative Nullable that avoids that overhead:

struct Nullable(T, T nullValue);

Bye,
bearophile

The question is what should be the result of:

Nullable(int*)?

New type, but no overhead.

Nullable!(Nullable!T)?


New type, with an extra boolean.

Reply via email to