Logical location of template instantiations

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 8 06:08:35 PDT 2016


On 08.07.2016 09:45, Jonathan M Davis via Digitalmars-d wrote:
> On Thursday, July 07, 2016 23:20:28 Timon Gehr via Digitalmars-d wrote:
>> On 07.07.2016 17:11, Jonathan M Davis via Digitalmars-d wrote:
>>>    So,
>>>
>>> the buck would have to be passed at every point that the symbol were
>>> passed
>>> as an alias argument such that the check for accessibility was only done
>>> when the symbol first became an alias.
>>> ...
>>
>> No, it is way simpler than that. Just don't ever check for visibility of
>> the symbol accessed through an alias.
>
> It has to be checked at some point, otherwise using a template alias
> parameter would allow you to completely bypass the accessibility modifiers.
> It's just that it seems like it should be checked at the point where the
> symbol is passed to the template and not within the template itself, whereas
> right now, it's checked within the template.
>
> - Jonathan M Davis
>

(That's what I said. In any case, it is simple to implement.)


More information about the Digitalmars-d mailing list