On Wed, 14 Mar 2007 18:42:59 -0700, Pedro LamarĂ£o
wrote:
> On 14 mar, 21:30, "Amadeus W.M." <[EMAIL PROTECTED]> wrote:
>> For theoretical purposes, how do I turn off NRVO behavior in g++? I
>> couldn't find anything relevant in the man page.
>
> Have you tried turning optimization off with -O0 ?
I've some code here that works fine on g++ 3.2.3, and when I compiled
it under g++ 3.4.6, it failed to compile. Here is a basic layout of
the code (albeit very simplified).
class Base
{
public:
class InnerBase
{
public:
InnerBase(const Base* ) { }
};
}
Keith Halligan wrote:
[...]
> class derived_second : public Base
> {
> public:
> derived_second() {}
>
> }
>
Compiles okay here after I fixed the missing semicolon after this class
definition. I'd say you were compiling something else, which makes you
whole posting useless.
Uli
--
http