This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Copy constructor with non const rhs arg


Hi Paul,

How about pass-by-value instead of pass-by-reference?

After all, an auto_ptr as a parameter should always be pass-by-value. That's the semantic of pass-by-value for auto_ptr: a transfer of ownership.

--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]