🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++.moderated
Article #3

Re: auto_ptr Question

#3
From: Dietmar Kuehl
Date: Thu, 14 Dec 1995 13:05
38 lines
2435 bytes
X-Original-Date: 14 Dec 95 11:36:01 GMT

Hi,
Curt Sellmer (curt@kazan.com) wrote:
: I read an article recently in the Microsoft Systems Journal
: that described a template called auto_ptr.
: This template is supposedly part of the proposed
: ANSI/ISO c++ library.
: Does anyone know where I can find an implementation
: of this template?  Are there any implementations of
: the ANSI/ISO library available on the net?

I don't know of any conforming implementation of the C++ Standard
Library. There doesn't seem to be a complete one available yet.
However, a while ago several different implementations of the 'auto_ptr'
class where floating around in comp.lang.c++. I implemented the class
'auto_ptr' myself building upon a more general class 'auto_res' (to
automatically release some resource, e.g. an object referenced by a
pointer which can be deleted, a chunk of memory allocated with
'operator new()' or with 'new[]', a file descriptor, etc.). You can
have a look at this implementation at

  http://www.informatik.uni-konstanz.de/~kuehl/c++/auto_res.h.html

This implementation is not completely standard conforming due to the
fact that I don't have compiler available which supports member
templates.  In addition the 'auto_res' part would benefit from default
template arguments which are also not (completely) supported by the
compilers available to me.
--
dietmar.kuehl@uni-konstanz.de
http://www.informatik.uni-konstanz.de/~kuehl
I am a realistic optimist - that's why I appear to be slightly pessimistic

    [ comp.lang.c++.moderated is a moderated newsgroup.  Submit articles ]
    [  to <c++-submit@netlab.cs.rpi.edu>.  The moderation policy can be  ]
    [   retrieved from <http://netlab.cs.rpi.edu/~cppmods/guide.html>.   ]
    [    Moderators can be reached at: c++-request@netlab.cs.rpi.edu.    ]
Technical Details
Message-ID: <4ap7e2$p2n@netlab.cs.rpi.edu>
Path: arc1-ca.pugleaf.net!library.erc.clarkson.edu!rpi!not-for-mail
References: <4angeq$ik2@netlab.cs.rpi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!library.erc.clarkson.edu!rpi!not-for-mail
From: kuehl@uzwil.informatik.uni-konstanz.de (Dietmar Kuehl)
Newsgroups: comp.lang.c++.moderated,comp.lang.c++
Subject: Re: auto_ptr Question
Followup-To: comp.lang.c++.moderated,comp.lang.c++
Date: 14 Dec 1995 13:05:06 -0000
Organization: Fakultdt f|r Mathematik und Informatik
Sender: cppmods@netlab.cs.rpi.edu
Approved: Dietmar.Kuehl@uni-konstanz.de
Message-ID: <4ap7e2$p2n@netlab.cs.rpi.edu>
References: <4angeq$ik2@netlab.cs.rpi.edu>
Reply-To: Dietmar.Kuehl@uni-konstanz.de
NNTP-Posting-Host: netlab.cs.rpi.edu