Extend the call site default argument expansion mechanism?
Meta
jared771 at gmail.com
Tue May 15 14:57:52 UTC 2018
On Tuesday, 15 May 2018 at 14:52:46 UTC, Steven Schveighoffer
wrote:
>> Sadly with(WithAlloc!alloc) doesn't work. (If you have to use
>> withAlloc.func everywhere, it kind of destroy the point,
>> doesn't it?)
>
> It seems opDispatch isn't being used in the with statement.
> That seems like a bug, or maybe a limitation. I'm not sure how
> "with" works, but I assumed it would try calling as a member,
> and then if it doesn't work, try the call normally. Probably
> it's checking to see if it has that member first.
>
> Annoying...
>
> -Steve
Yeah I tried it with opDispatch but it didn't work. I vaguely
remember some changes being made to how lookup is done in the
past year or so... but I can't find the PR in question.
More information about the Digitalmars-d
mailing list