Updated DIP22 - Private symbol visibility

Timon Gehr timon.gehr at gmx.ch
Sun Dec 22 13:50:05 PST 2013


On 12/22/2013 08:48 PM, Martin Nowak wrote:
> On 12/22/2013 12:05 AM, Timon Gehr wrote:
>>>
>>
>> How is this going to work?
>
> Ah sorry, I misread your example.
> The call template function is in module a, so it has access too.
>
>  > Are you arguing for creating multiple instances of 'call'?
>
> So this is indeed not necessary, the function is called within the
> template, so only the template scope determines whether a function is
> accessible.

Therefore none of the following two calls will work?

module a;
import b;

auto call(alias a){ a(0); }

void x(){
     call!foo();
}

module b;
import a;

private auto foo(int x){ }
auto foo(double x){ }

void y(){
     call!foo();
}



More information about the Digitalmars-d mailing list