Passing private functions to template algorithms

Max Samukha via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 7 23:49:24 PDT 2016


On Wednesday, 8 June 2016 at 00:48:00 UTC, Stefan Koch wrote:
> On Tuesday, 7 June 2016 at 18:59:03 UTC, Timon Gehr wrote:
>>
>> I think it is obvious that this should work. Visibility checks 
>> need to happen during identifier lookup. This lookup is 
>> happening in the module where isFileNothrow is visible.
>
> I agree with you.
> However something in the back of my mind tells me that we'll be 
> hitting nasty corner cases if we change the behavior.

Something in the back of mine tells that no corner cases can be 
worse than the present situation. It is like disallowing private 
variables to be passed to imported functions.


More information about the Digitalmars-d mailing list