On 12/21/2013 10:36 PM, Dicebot wrote:
If MUST have different overload resolution if B does not have access to
those A function. Anything else is damn broken module system. Why would
anyone expect to move functions between modules and have accessibility
rules magically persistent?

It's important for example to define a forwarding template in a different module.

void call(alias funcs, Args...)(auto ref Args args)
{
    funcs(args); // overload resolution happens here
}

It is a major design issue with templates using declaration scope for
access resolution instead of instantation scope. I think it was a
mistake and is unrelated to general visibility rules.

What? It's a major design win that we don't have to rerun semantic for every identical instantiation, in the same sense that we don't have to reinclude header files.
Or are you only talking about access checks?
I don't think that handling access resolution separately from look-up resolution is desirable.

Reply via email to