This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.1 changes.html and the NRVO


Phil Edwards <phil@jaj.com> writes:

| Didn't we used to do the NRVO at one time?

Not really.  Way back, the front-end infrastructure was very limited
so that we couldn't support the Return Value Optimization within
standard C++.  Therefore a really non standard syntax was invented to
tell the parser that we wanted to return something:

   operator+(complex<double> a, complex<double> b) returns r;
   {
     // ...
   }

Given that, I don't think we can reasonably say that we're doing the NRVO. 

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]