Article View: comp.std.c++
Article #2115Maybe we should use ref_count instead of auto_ptr ?
From: Eugene Radchenko
Date: Thu, 05 Oct 1995 08:26
Date: Thu, 05 Oct 1995 08:26
38 lines
2561 bytes
2561 bytes
Hello readers!
Maybe reference counting should be in the standard after all?
At least it would eliminate the sticking point of auto_ptr constructor and
operator= taking const or non-const arguments (as both choices are bad)...
Did the commitee members expected its standardization to take so much time?
Probably we need two versions of the reference counting - one basically
extended auto_ptr (or maybe leave the name and only adjust the semantics?)
and another containing the operator T&() to mimic the actual object (the
problem of constructing it might be solved by appropriate subclassing of
the basic template). In the second case it might be wise to require that
all such objects be derived from common base class providing the counter
field (to avoid having 'new int' in ref.counter class).
Which reminds me - in localization library, wouldn't it be nicer to put
'id' field in Facet class itself instead of having all derived classes to
include it explicitly anyway?)
Best regards Genie
P.S. Oh why the standard process takes so long? I once hoped that the
standard will be out by the end of the year. Now it seems it will be year
1997 at least. Thus compiler vendors have an excuse to sell retarded
compilers...
On the other hand, commitee members have made references several times
about this being 'only first round of the standardization process'. Maybe
it would be better not to issue standard requiring updates immediately?..
--
--------------------------------------------------------------------
Eugene V. Radchenko Graduate Student in Computer Chemistry
E-mail: eugene@qsar.chem.msu.su Fax: +7-(095)939-0290
Ordinary mail: Chair of Organic Chemistry, Department of Chemistry,
Moscow State University, 119899 Moscow, Russia
***************** Disappearances are deceptive *******************
---
[ 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:
<ABupaSmSvP@qsar.chem.msu.su>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back Date: 05 Oct 95 08:26:03 GMT Approved: fjh@cs.mu.oz.au Newsgroups: comp.std.c++ Message-ID: <ABupaSmSvP@qsar.chem.msu.su> Organization: Lab. of Org.Synth., MSU X-Original-Date: Wed, 4 Oct 1995 11:59:36 +0300 (MSK) From: "Eugene Radchenko" <eugene@qsar.chem.msu.su> X-Mailer: dMail [Demos Mail for DOS v1.23] Subject: Maybe we should use ref_count instead of auto_ptr ?