Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-11-10 13:05:30


On Sun, 10 Nov 2002 17:57:16 +0100, "Terje Slettebø"
<tslettebo_at_[hidden]> wrote:

>Since, as Dave said, it may change the observable behaviour, it's perhaps
>not such a good idea to have an optimisation switch that changes the
>observable behaviour. That could be confusing.

That's another kettle of fish :-) The standard allows the
optimization, which means you must never rely on the copy constructor
being (not) called. And a copy constructor must simply create copies
of objects. In any case, it's annoying when you want to observe what
the copy constructor does in a given scenario and you can't set a
breakpoint in it because it is not even called. I have often felt the
need to turn the optimization off during debugging.

Genny.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk