Boost logo

Boost :

From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2000-10-12 15:36:44


"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