Boost logo

Boost :

From: Amir Husain (amirhusain_at_[hidden])
Date: 2001-04-06 08:04:48


Sorry

Must look like a kid question the thing i wanna ask is why do we use auto_array_ptr rather then the normal pointer wat benefits are there in using it??

Why a auto_ary_ptr noa a normal ptr?

thanks

amir

>From: "David Abrahams"
>Reply-To: boost@yahoogroups.com
>To:
>Subject: Re: [boost] Re: auto_array_ptr
>Date: Fri, 6 Apr 2001 08:42:55 -0400
>MIME-Version: 1.0
>Received: from [208.50.99.198] by hotmail.com (3.2) with ESMTP id MHotMailBC97046F005540043163D03263C68CF9139; Fri Apr 06 05:51:08 2001
>Received: from [10.1.4.52] by hm.egroups.com with NNFMP; 06 Apr 2001 12:45:21 -0000
>Received: (EGP: mail-7_1_1); 6 Apr 2001 12:45:20 -0000
>Received: (qmail 5897 invoked from network); 6 Apr 2001 12:44:49 -0000
>Received: from unknown (10.1.10.26) by m8.onelist.org with QMQP; 6 Apr 2001 12:44:49 -0000
>Received: from unknown (HELO hwd.net) (63.201.110.219) by mta1 with SMTP; 6 Apr 2001 12:44:49 -0000
>Received: from davida [205.181.17.12] by hwd.net (SMTPD32-5.01) id ABB03F40256; Fri, 06 Apr 2001 04:50:56 PST
>From sentto-1234907-8052-986561121-amirhusain Fri Apr 06 05:53:00 2001
>X-eGroups-Return: sentto-1234907-8052-986561121-amirhusain=hotmail.com@returns.onelist.com
>X-Sender: abrahams@altrabroadband.com
>X-Apparently-To: boost@yahoogroups.com
>Message-ID: <019501c0be97$1aaf9e70$6701a8c0@abeast1.com>
>References: <009d01c0be8f$a79478e0$160524d4@pdimov> <017601c0be92$74f59c90$6701a8c0@abeast1.com> <00bf01c0be95$331395e0$160524d4@pdimov>
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Mailer: Microsoft Outlook Express 5.50.4133.2400
>X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400
>X-eGroups-From: "David Abrahams"
>Mailing-List: list boost@yahoogroups.com; contact boost-owner@yahoogroups.com
>Delivered-To: mailing list boost@yahoogroups.com
>Precedence: bulk
>List-Unsubscribe:
>
>
>----- Original Message -----
>From: "Peter Dimov"
>
>
> > The caveat about temporary smart pointer objects still applies. My rule is
> > "never create an unnamed temporary smart pointer." The non-const reference
> > idiom tries to enforce this rule... although I have another reason for
> > preferring pass by non-const reference:
> >
> > void f(T arg);
> >
> > T t;
> >
> > f(t);
> >
> > // now t is unchanged, right?
>
>Wrong, of course. Usually, the declaration of f isn't visible near the call,
>so you can't assume much about what's changed. But this case could be seen
>as an argument for using the unnamed temporary... then there's no object
>hanging around with a confusing value.
>
>-Dave
>
>
>To unsubscribe, send email to:
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk