Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-09 21:00:00

"Terje Slettebø" <tslettebo_at_[hidden]> writes:

>>From: "Gennaro Prota" <gennaro_prota_at_[hidden]>
>>On Sat, 9 Nov 2002 17:14:49 +0100, "Terje Slettebø"
>><tslettebo_at_[hidden]> wrote:
>>> In any case, the
>>>program below detects presence of NRVO, by returning zero, or greater than
>>>zero if NRVO is not present.
>>Actually it shows whether that optimization is applied in a specific
> True. But it's better than nothing. :) Intel C++ applied the NRVO, even with
> all optimisations turned off. In the same way, MSVC 6 did not, regardless of
> settings.

I suspect that you'll find this to be the case on most compilers. The
RVO doesn't fall into the category of back-end or
intermediate-language optimizations that compilers usually let you
turn on and off. It has to happen in the front-end, since it often
implies observable differences in the code's behavior.

                       David Abrahams
   dave_at_[hidden] *
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at, gregod at, cpdaniel at, john at