🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3069

Re: auto_ptr again

#3069
From: dak
Date: Mon, 22 Jan 1996 22:13
35 lines
2097 bytes
In article <AUSTERN.96Jan18103535@isolde.mti.sgi.com>, Matt Austern
(austern@isolde.mti.sgi.com) wrote:

> In article <4djrn4$js1@engnews1.Eng.Sun.COM> clamage@Eng.Sun.COM
> (Steve Clamage) writes:

[snip]

> > That is, single ownership is a deliberate design decision based on the
> > semantics an auto-ptr should have. It is not an implementation issue.
> 
> I thought it was generally agreed that auto_ptrs as currently defined
> were broken---specifically, that the semantics of strict ownership,
> constness, and the binding of temporary objects, ended up making an
> auto_ptr nearly useless for returning a value from a function.

[snip]

I would like to know what happened to the suggestion that the choice of
having temporaries be const be changed to a more relaxed rule.  I do not
recall the exact wording of the proposition, but I believed it only put
const on temporaries that were the result of a conversion.

Has it even been discussed ? I do find it quite cynical that this exact
choice (temporaries are const) makes it hard to use auto_ptr in return
value (and some other uses too in smart pointer), while most compiler have
a switch to allow non-const temporaries (and thus disabling any protection
from unexpected conversion on function argument that was the original
intent).

If it was rejected, I'd like to know on what ground, if anyone recalls.
---
[ 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: <Pine.A32.3.91.960122095620.24366A-100000@zorglub.cae.ca>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back

Show Full Headers
Complete Article Headers
From: dak <pierreba@poster.cae.ca>
Message-ID: <Pine.A32.3.91.960122095620.24366A-100000@zorglub.cae.ca>
X-Original-Date: Mon, 22 Jan 1996 10:08:37 -0500 (EST)
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 22 Jan 96 22:13:49 GMT
Approved: fjh@cs.mu.oz.au
Organization: -
Newsgroups: comp.std.c++
Subject: Re: auto_ptr again
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMQQMN+EDnX0m9pzZAQH8aQF/WIUvPRPIxnJVol7C4JVhcyFxevcOLxpC
 tyssQnpH8scdfjHK5sGuGj/jGIB/XzpZ
 =iHgm