
2 May
2005
2 May
'05
8:53 p.m.
"Gennadiy Rozental" <gennadiy.rozental@thomson.com> 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 www.boost-consulting.com