On 05/11/12 20:40, Mehrdad wrote:
> On Friday, 11 May 2012 at 18:32:12 UTC, Artur Skawina wrote:
>> Since it is a function template the attributes are inferred, in this case 
>> from data's opIndex, if any. The arguments are forwarded as-is, ie data's 
>> opIndex has to deal with them.
> 
> 
> Among other things, 'scope' gets messed up.

How? By making the forwarder not callable w/ a scoped argument, when the
target function would be? It isn't a problem for operator overloading, as
the signature(s) are known. But in general, scope-inference would be needed.
Which has similar problems as 'uniq', for non-trivial function bodies. 

Yes, things aren't perfect; eg 'this' attributes/classes like shared or const
also need explicit handling (recent frontend changes apparently improved the
situation a bit).

artur

Reply via email to