From -6268625676217054338
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ee18c3926b4a832d
X-Google-Attributes: gidf78e5,public
From: jpotter@falcon.lhup.edu (John Potter)
Subject: Re: set.erase( it1, it2)
Date: 2000/11/13
Message-ID: <3a0f01b2.31868922@news.csrlink.net>#1/1
X-Deja-AN: 693151630
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <3A0ED736.133D060@jps.net>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 974138852 mail2news:23300 mail2news mail2news.demon.co.uk
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
NNTP-Posting-Date: Sun, 12 Nov 2000 15:40:28 EST
Newsgroups: comp.std.c++

On Sun, 12 Nov 2000 18:55:47 GMT, Dennis Yelle <dennis51@jps.net> wrote:

> Is this legal:

No.

> void f( set<char>& a, set<char>& b)
> {
>   a.erase( b.begin(), b.end());
> }
> 
> It seems to crash gcc if b is not empty.
> If not legal, where does the standard say
> that it is not legal?

23.1.2/7

John

---
[ 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                ]
[ Note that the FAQ URL has changed!  Please update your bookmarks.     ]




