From 5535015552115429658
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,df06663c0326d841
X-Google-Attributes: gid109fba,public
X-Google-Thread: f78e5,df06663c0326d841
X-Google-Attributes: gidf78e5,public
From: Alexandre Oliva <oliva@dcc.unicamp.br>
Subject: Re: auto_ptr copy semantics
Date: 1999/04/15
Message-ID: <or1zhtt4ic.fsf@dcc.unicamp.br>#1/1
X-Deja-AN: 466706738
Approved: Valentin Bonnard <bonnard@clipper.ens.fr>
References: <7el5br$kjj$1@nnrp1.dejanews.com>
X-Original-Date: 10 Apr 1999 02:43:07 -0300
Organization: IC - UNICAMP - Campinas, SP, Brazil
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUANxXj0awEuYhIxRhxAQEdQQH+P9Og9oi5/L/TZLcpglek9nREsZabgJ3e x28mn3VLGvyppkPHl66izntEmfX8A+mAJ8RAIa38yU6oHkhXoApapg== =pJQP
Content-Type: text/plain; charset=us-ascii
User-Agent: Gnus/5.07008 (Pterodactyl Gnus v0.80) XEmacs/20.4 (Emerald)
Mime-Version: 1.0
Newsgroups: comp.lang.c++,comp.std.c++

On Apr 10, 1999, sjm@cae.co.uk wrote:

> What is the rationale behind the copy semantics of auto_ptr
> transfering ownership of its contained pointer?

You can safely return newed objects from functions.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



