Article View: comp.std.c++
Article #3223Re: auto_ptr again
From: Joe Buck
Date: Sat, 03 Feb 1996 06:46
Date: Sat, 03 Feb 1996 06:46
28 lines
1808 bytes
1808 bytes
"john (j.d.) hickin" <hickin@bnr.ca> writes: >And this, the expectation that constructors of the form X(X&) and X(const X&) >must perform a *copy* operation, is, IMHO, the trouble. No, the notion that these constructors perform copy operations (and only copy operations) is deeply wired in to the language, in at least three places: argument passing, return value passing, and optimizing away of copy constructors all assume these constructors mean "copy". >The original term was reference constructor, a name which, in my opinion, >carefully stepped around all subtleties of language. I have never seen this term used. Stroustrup said "copy constructor" at a very early stage. Anyone who writes a class in which X(X&) or X(const X&) does not have the semantics of a copy operation is doing something wrong (e.g. auto_ptr in the draft standard is broken). -- -- Joe Buck <jbuck@synopsys.com> (not speaking for Synopsys, Inc) Work for something because it is good, not just because it stands a chance to succeed. -- Vaclav Havel --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<4eucnc$hr9@hermes.synopsys.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backReferences:
<4ebhn5$lgt@bmtlh10.bnr.ca>Show Full Headers
Complete Article Headers
From: jbuck@Synopsys.COM (Joe Buck) Message-ID: <4eucnc$hr9@hermes.synopsys.com> X-Original-Date: 3 Feb 1996 01:11:08 GMT Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back Date: 03 Feb 96 06:46:42 GMT Approved: fjh@cs.mu.oz.au Newsgroups: comp.std.c++ Subject: Re: auto_ptr again Organization: Synopsys Inc., Mountain View, CA 94043-4033 References: <4ebhn5$lgt@bmtlh10.bnr.ca> X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMRME6+EDnX0m9pzZAQFzBwF9E/a84N4J0RhtBmlcqwr14R3BbejgLSUZ F89/OrB+Cn24JPx8B8Fd3WnbENZQ5KOJ =zS6o