From 3675868662753321086
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,7c21e57f4a25e5f3
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-05-07 05:19:01 PST
Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: James Dennett <jdennett@acm.org>
Newsgroups: comp.std.c++
Subject: Re: deleted pointers in a container
Date: Mon,  7 May 2001 12:18:39 GMT
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3AF69057.1778277E@acm.org>
References: <3AF0BE2C.F07A2FB7@acm.org> <OE45ZY5sukPifCLKgE100004423@hotmail.com>
X-Trace: mail2news.demon.co.uk 989237930 mail2news:2236 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Accept-Language: en
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 30
Xref: newsfeed.google.com comp.std.c++:4524

Assaf Lavie wrote:
> 
> >IIRC that's not specified by the Standard.  Maybe it should
> >be, or maybe it is and I've just missed it.
> 
> Why do you make the assertion that copying deallocated pointers (not
> de-referencing them) yields undefined behavior if it is not specified by the
> standard?

The fact that copying deallocated pointers yields undefined
behaviour *is* clearly stated by the Standard.

The thing that the Standard does not specify (and I hoped this
was clear from the context in which my words were originally
found, as a reply to a post of Markus Schaaf) is how often a
std::vector might copy the objects it contains.

It's possible that we might be able to look at the exception-
safety guarantees and try to conclude that copying is only
allowed during certain operations, but I'm not confident of
that and even if it is possible, it's a kludge.

-- James Dennett.

---
[ 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://www.research.att.com/~austern/csc/faq.html                ]



