Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-10-31 23:28:03


"Kevin S. Van Horn" <Kevin.VanHorn_at_[hidden]> writes:

> What you're missing here is that if I, as the implementor, declare
> the argument to bee foo_t const &, it will be because I do not
> intend to make a copy, and there are then no copy efficiency
> concerns for you, the user, to worry about. On the other hand, if I
> declare it to be foo_t, this will only be because I need to create
> _and_ _take_ _ownership_ _of_ an actual copy

I think you're confused. The copy is owned by the virtual machine,
since it gets created on the stack. Usually, "take ownership of" only
applies to heap objects whose lifetimes can be managed by their
owners.

-- 
                    David Abrahams
dave_at_[hidden] * http://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