On Saturday, 21 December 2013 at 21:14:43 UTC, Martin Nowak wrote:
If I make a refactoring and move a function from module A to B,
but the function calls an overload set in A it should not have
a different overload resolution.
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?
Similar case, if I pass an overload set via alias to a traits
template in module B, the template should follow the same
overload resolution.
It's very important that we preserve these properties.
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.