RVO (let the compiler copy)

Marc Glisse marc.glisse@inria.fr
Thu Dec 19 10:41:00 GMT 2013


On Thu, 19 Dec 2013, Henrik Mannerström wrote:

> This question came up on SO (
> http://stackoverflow.com/questions/7320520/optimizing-the-number-of-constructor-calls)
> and I was baffled since it went against the mantra "let the compiler do
> the copying". Do you have an idea of what is going on? Why is the
> commented version of operator+ worse?

See:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57176

-- 
Marc Glisse



More information about the Gcc-help mailing list