From 7670529590169022497 X-Google-Thread: f78e5,6422ca3869a1fee1 X-Google-Attributes: gidf78e5,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!news2.euro.net!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!amsnews11.chello.com!cw-insnet-peer-00!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull From: dave@boost-consulting.com (David Abrahams) Newsgroups: comp.std.c++ Subject: Re: Should any iterator have an operator->() in C++0x? Date: Sat, 24 Mar 2007 14:02:53 GMT Lines: 42 Sender: mail2news@demon.net Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++) Message-ID: <87hcsbz3td.fsf@valverde.peloton> References: <4602F166.5EBB30AC@this.is.invalid> <1174670662.680722.317420@l75g2000hse.googlegroups.com> NNTP-Posting-Host: news.news.demon.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1174744991 16156 158.152.254.254 (24 Mar 2007 14:03:11 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 24 Mar 2007 14:03:11 +0000 (UTC) X-Original-To: std-c++@mailman.ucar.edu X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux) X-DMCA-Complaints-To: abuse@rcn.net X-Virus-Scanned: amavisd-new at csse.unimelb.edu.au X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Cancel-Lock: sha1:cOWXprKgydW9yN08RJs/tksGyPw= X-Received: (from fjh@localhost) by mulga.csse.unimelb.edu.au (8.13.8+Sun/8.13.8/Submit) id l2OE2rYK000146; Sun, 25 Mar 2007 01:02:53 +1100 (EST) X-Path: comp-std-cpp-robomod!not-for-mail X-NNTP-Posting-Date: Fri, 23 Mar 2007 23:02:54 -0500 X-Delivered-To: std-c++@mailman.ucar.edu X-Postfilter: 1.3.34 X-Authentication-Warning: serv3.gc.dca.giganews.com: news set sender to poster@giganews.com using -f X-Newsgroups: comp.std.c++ Xref: g2news1.google.com comp.std.c++:8203 on Fri Mar 23 2007, "Greg Herlihy" wrote: > So is (*a).m ever well-formed when *a is an int? At first it may > appear that the answer would have to be "no". But C++ is a rich > Standard, full of nuances and subtleties. As it turns out, there is a > least counter-example: > > typedef int Int; > > int main () > { > int * p = new int; > > *p = 3; > > (*p).~Int(); > p->~Int(); > } > > The same kind of explicit destructor call syntax is also legal within > the context of a template instantiated with a type int (and in which > case the typedef is not needed). > > So, despite initial appearances to the contrary, ConceptGCC has in > fact implemented iterator requirements correctly in this case. Oh. my. G*D! That's really perverse. But technically, I have to agree with you. -- Dave Abrahams Boost Consulting www.boost-consulting.com --- [ 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.comeaucomputing.com/csc/faq.html ]