Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-06-24 07:41:29


"Robert Ramey" <ramey_at_[hidden]> writes:

> I'm saying that
>
> const X &x = m_x;
> ar << x;
> is different thatn
> const x = m_x
> ar << x;

I'm sorry, but unless you're doing something to detect that X's copy
ctor is called in the 2nd case, what you just said is impossible.
Aside from one copy ctor the 2 snippets are identical from the
language's point-of-view.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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