`alias this` pointers and typeof(null)
Andrea Fontana via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jan 29 05:59:15 PST 2016
On Friday, 29 January 2016 at 13:38:20 UTC, Tomer Filiba wrote:
> I can change all such invocations into ``func(FooPtr(null))``
> but it's tedious and basically requires me to compile tens of
> times before I'd cover everything. Is there some workaround to
> make null implicitly convertible to my alias-this type? I mean,
> it's Foo* would accept `typeof(null)` so why can't FooPtr with
> an alias-this to Foo* do so too?
>
> -tomer
What about this:
http://dpaste.dzfl.pl/3305cdf8b7b4
?
Andrea
More information about the Digitalmars-d
mailing list