Koenig lookup in D?

John Colvin john.loughran.colvin at gmail.com
Tue Aug 27 10:25:56 PDT 2013


On Tuesday, 27 August 2013 at 16:59:14 UTC, monarch_dodra wrote:
> On Tuesday, 27 August 2013 at 15:10:45 UTC, deadalnix wrote:
>> On Tuesday, 27 August 2013 at 13:51:51 UTC, monarch_dodra 
>> wrote:
>>> D has a way of doing things that C++ can, but usually, with a 
>>> twist that makes it safer and/or more powerful, or with some 
>>> very well thought mechanics.
>>>
>>> In this case, it really feels as if the whole a host of 
>>> functionality is just both supported, *and* with no 
>>> workarounds :/
>>>
>>> If we don't have ADL I kind of like the notion of "forced 
>>> import infection" though...
>>
>> What do you mean by that ? Being able to force feed an import 
>> in a template instantiation ? That'd be great, because of UFCS.
>
> I'm unsure ^^
>
> you brought it up: "We should be able to inject import into 
> templates."
>
> Did you have anything specific in mind?

We can already do this (sortof) by passing some imports in a 
string/mixin template to the template. Obviously you have to 
write the template with this in mind though, which isn't ideal. 
Also you'd have to check for duplicate imports.


More information about the Digitalmars-d mailing list