Re: finding about move vs copy in C++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Dec 2014 09:18:35 pm Jonathan Wakely wrote:
> What exactly are you worried about, the compiler failing to perform
> moves, or your code missing opportunities to move?
> 
> The former will very rarely be a problem, the latter can be solved by
> understanding the language better.
> 
Well there's the rub. When there may or may not be an automatically generated 
move assignment or constructor and the compiler may or may not choose a move 
based on the risk of an exception being thrown and with the return value 
optimisation etc it's rather difficult to predict exactly what will happen.

Since this is a static decision it would be nice if the compiler could tell 
me. Otherwise I have to step through it in gdb to find out what method it is 
using.
-- 
Anthony Shipman                    Mamas don't let your babies 
als@xxxxxxxxxxxx                   grow up to be outsourced.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux