friends with phobos, workaround?
Daniel N via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Sep 11 14:57:32 PDT 2015
On Thursday, 10 September 2015 at 13:19:08 UTC, Adam D. Ruppe
wrote:
> On Thursday, 10 September 2015 at 08:22:29 UTC, Daniel N wrote:
>> this(string caller = __MODULE__)(int val) if(caller ==
>> "std.conv") // Use scoped!Awesome
>
> That's disgustingly.... genius. I'm a bit jealous I didn't
> think of it myself!
>
> One slight problem though: you couldn't call super() from a
> derived class, since the constructor wouldn't even exist due to
> the constraint.
>
super():
Hmm, yes that's a slight nuisance but manageable.
Thanks, coming from you that means a lot. :) Hmm, maybe I'll wait
a week or two before I share my next trick to give you ample time
to think of it also, meanwhile I'll just scribble it down in the
margin of my copy of "D Cookbook". ;) ... just hope I didn't jinx
myself now ...
More information about the Digitalmars-d-learn
mailing list