Proposal: Operator overloading without temporaries

Sean Kelly sean at f4.ca
Mon Mar 27 17:20:25 PST 2006


kris wrote:
> Sean Kelly wrote:
>> Charles wrote:
>>
>>> Wow looks good ... too good.  How could this have gone 
>>> un[noticed|implemented] in the  last 20 years ?  I'm anxious to here 
>>> Walters take.
>>
>>
>> I have a feeling this may be a lot more difficult in C++ because of 
>> ADL--there are simply a lot more functions to be evaluated when 
>> building expression trees.  Also, the standard doesn't seem to 
>> consider things from a compiler writer's perspective, which this 
>> three-value code optimization requires.
> 
> ADL? Does that stand for Attention Deficit Level?

Argument Dependent Lookup.  ie. the complex overload resolution 
semantics in C++.  Another potential issue is the lack of "_r" functions 
in C++, since while free functions can do quite a bit they must either 
use temporaries, be friend functions with very odd semantics, or do 
something akin to expression templates.


Sean



More information about the Digitalmars-d mailing list