Boost logo

Boost :

From: Gennadiy Rozental (gennadiy_at_[hidden])
Date: 2002-09-30 09:57:38


"Markus Schöpflin" <markus.schoepflin_at_[hidden]> wrote in message
news:3D98627A.4F937FBB_at_ginit-technology.com...
> Gennadiy Rozental wrote:
> >
> > > The problem is, the temporary object wrapstrstream() is bound to the
> > > const reference wrapstrstream const& targ which requires an accessible
> > > copy constructor.
> > Why?
>
> Because of 8.5.3(5) (and vacpp 5 and comeau online) say so.
>
> Markus

You have the const reference that is bound to the temporary object. When do
you need copy constructor?

Gennadiy.

P.S. Cameau onlinr does seems to complain about following code:
class A {
public:
    A() {};
private:
    A( A const& );
    void operator=( A const& );
};

void foo( A const& )
{
}

void moo()
{
    foo( A() );
}

Could anybody explain why?


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