From -7431403572366114837
X-Google-Thread: f78e5,174aa7b34b06a51
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!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 06 Dec 2005 21:40:01 -0600
Return-Path: <devnull@stump.algebra.com>
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)
Delivered-To: std-c++@ucar.edu
From: "Andrew Koenig" <ark@acm.org>
Newsgroups: comp.std.c++
References: <1132629737.664847.151630@o13g2000cwo.googlegroups.com> <1132662585.882464.24110@f14g2000cwb.googlegroups.com> <E1EeZw5-0004wI-00@chx400.switch.ch> <XBQgf.150724$zb5.113482@bgtnsc04-news.ops.worldnet.att.net> <1132759176.368850.264850@g43g2000cwa.googlegroups.com> <H1phf.161529$zb5.99785@bgtnsc04-news.ops.worldnet.att.net> <E1Efenr-00018u-00@chx400.switch.ch> <5HKjf.205668$zb5.87310@bgtnsc04-news.ops.worldnet.att.net> <200512021422.jB2EMEuC046212@horus.isnic.is>
Subject: Re: Is this really unspecified behavior?
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Message-ID: <Iyllf.235144$zb5.86353@bgtnsc04-news.ops.worldnet.att.net>
X-Complaints-To: abuse@worldnet.att.net
Organization: AT&T Worldnet
X-Greylisting: NO DELAY (Relay+Sender autoqualified);
	processed by UCSD_GL-v2.1 on mailbox8.ucsd.edu;
	Tue, 06 December 2005 11:23:21 -0800 (PST)
X-Spamscanner: mailbox8.ucsd.edu  (v1.6 Aug  4 2005 15:27:38, 1.2/5.0 3.0.4)
X-MailScanner: PASSED (v1.2.8 7311 jB6JNKWA039295 mailbox8.ucsd.edu)
X-Virus-Scanned: amavisd-new at ucar.edu
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Date: Tue,  6 Dec 2005 21:35:48 CST
Lines: 63
NNTP-Posting-Host: 65.182.171.162
X-Trace: sv3-fROzjSYxHJbv9gw+sEy7Hot6Ar9uo1T7/dyCsQObRdiD2zphfKUY0bT4LrVnt1H7/KgHuZbErGoBjrs!1sgP92kQtgsibLBRv29HFYewgYUvDOSYviPR7tUy9ImXDuer6CZn0fGWWcerYv/mBXPv+JWCpw8m!dQuA+1UNpVphwVjvOvtcDpHX0XotMQuwTRa1udSplcRU48jl
X-Complaints-To: abuse@speakeasy.net
X-DMCA-Complaints-To: abuse@speakeasy.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.32
Xref: g2news1.google.com comp.std.c++:2672

"Hyman Rosen" <hyrosen@mail.com> wrote in message 
news:200512021422.jB2EMEuC046212@horus.isnic.is...
> Andrew Koenig wrote:
>>>So that's why the committee decide to abandon two-phase
>>>name lookup in templates?

>> Explain, please.

> Existing compilers which implemented templates
> didn't use two-phase name lookup. Many vendors
> continue to ship nonconforming implementations.
> Many users of conforming compilers are confused
> and upset when they discover that their old code
> doesn't work any more.

> And yet, the committee standardized that approach
> anyway. This demonstrates that the committee was
> willing to override those objections in what it
> deemed a good cause. The changes required to fix
> order of implementation would be much less severe
> than the changes required for two-phase lookup,
> and no previously defined program behavior would
> change. That is why I believe I can "wish away"
> the reality that vendors might object to this.

This isn't an explanation.

You said that the committee decided "to abandon two-phase name lookup in 
templates," and when I asked you for an explanation, you said that they 
didn't abandon it.

So I guess you were being sarcastic, which is not a good way to get people 
to take you seriously in a technical discussion.

Here are some facts that I think go a long way toward explaining the current 
state of affairs.

The C++ standards committee had its organizational meeting literally the day 
after the C89 standard was ratified.  It was chartered to standardize C++ 
using two documents as its basis:

    1) The newly ratified C standard;
    2) The Annotated Reference Manual.

The C standard was quite explicit about the behavior of built-in operators 
on values of built-in types.  Moreover, the ARM was reasonably consistent 
about deferring to C the definition of how such operators behave.

In contrast, the C standard was, of course, utterly silent about templates 
and exceptions, and the ARM marked both those features as "experimental."

Accordingly, I find it completely unsurprising that the committee was much 
more deferential to past usage in the case of order of evaluation than it 
was in the case of templates, and equally unsurprising that vendors went 
along with changes in template behavior where they would not have tolerated 
changes in behavior of built-in operators on operands of built-in types.

---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]



