[PATCH] Exploit move semantics in std::accumulate.

Paolo Carlini paolo.carlini@oracle.com
Tue Jan 11 13:25:00 GMT 2011


On 01/11/2011 02:18 PM, Marc Glisse wrote:
> But then the user could have defined
>
> std::string operator+(std::string const&,MyType){...}
>
> but not operator+=(std::string&,MyType)
>
> If you want it to be equivalent, I don't think you can avoid making a
> list of cases known to work.
Ok, it's because I was considering only member operator+=. Let's really
delay this, too tricky for too little benefit at this stage.

Paolo.



More information about the Libstdc++ mailing list