Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-05-02 15:53:54

"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> writes:

>> This is very powerful.
> And dangerous. Cause allows developer to "forget" about an extra
> copy.

I'm not sure where you think the "extra" copy is. The copy is already
implicit in the RHS expression, isn't it?

In general C++ will make lots of copies you can't control. Extra
copies are hardly "dangerous" (except maybe with auto_ptr). They may
be inefficient, but then I don't believe in trying to prevent people
from writing inefficient code, especially when that's more convenient.
Very little of the code end users write actually needs to be fast.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at