Boost logo

Boost :

From: Lois Goldthwaite (loisg_at_[hidden])
Date: 2000-10-12 17:28:04


And unless you declare a private copy constructor, the compiler will
synthesize a public one for you.

Lois

Jens Maurer wrote:
>
> "Erdei, András" wrote:
> > > [2]
> > > operator ++ ( proxy & __result, T& real, int )
> > > {
> > > proxy __tmp( real ); // construct local temporary
> > > __result::proxy( __tmp ); // copy ctor into return value
> >
> > If i understand your pseudo-code correctly:
> > proxy has no copy ctor, so the compiler can't
> > call it.
>
> "return x;" always requires a copy ctor for the type of x.
>
> Assuming that the proxy has no copy ctor means that the whole
> point is moot, because then the proxy cannot be returned (by
> value) at all. Copy constructor elison by return value
> optimization still requires that the copy constructor exists.
>
> Jens Maurer


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