From -5683065750879728969
X-Google-Thread: f78e5,d9fe358a73c69991
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 12 Aug 2005 10:00:01 -0500
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: "Wu Yongwei" <wuyongwei@gmail.com>
Newsgroups: comp.std.c++
Subject: Re: Should failure to instantiate a function template abort compilation during overload resolution?
Organization: http://groups.google.com
Message-ID: <1123837974.390668.237380@z14g2000cwz.googlegroups.com>
References: <1123485075.096196.242990@g44g2000cwa.googlegroups.com>
   <hinnant-6B7192.21000609082005@syrcnyrdrs-03-ge0.nyroc.rr.com>
   <1123642375.849913.19940@f14g2000cwb.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Complaints-To: groups-abuse@google.com
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: z14g2000cwz.googlegroups.com; posting-host=211.152.42.2;
   posting-account=YpX4bQ0AAABQX3uC3kY4dsrVfN1inbmo
X-Greylisting: NO DELAY (Relay+Sender autoqualified);
	processed by UCSD_GL-v2.1 on mailbox7.ucsd.edu;
	Fri, 12 August 2005 02:13:01 -0700 (PDT)
X-Spamscanner: mailbox7.ucsd.edu  (v1.6 Aug  4 2005 15:27:38, -2.8/5.0 3.0.4)
X-MailScanner: PASSED (v1.2.8 93018 j7C9D0VM002958 mailbox7.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: Fri, 12 Aug 2005 09:50:03 CST
Lines: 27
NNTP-Posting-Host: 65.182.171.162
X-Trace: sv3-femAmdtyrxsHf0OnZzuKPkdL1nIuHXqRDJLWU615FMdh33Xm5eEK/F6BimZ8nFDSssq+nWf0bvpQ+ss!ZjQqgApyrHSqkIgW+u4gV1U+yEIS5aI0b1GFdkP5b/is2bk5i7h7r3RHlVNsejvt1JvVztMMyGjN!cb6I8aCvTrk+QO7AbbS1U1zD9ZqejdSi0QUVDa+P4Bg=
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++:1786

Wu Yongwei wrote:
> My current opinion is that failure to instantiate a template function
> should automatically remove it from the candidates of overload
> resolution.

When discussing this issue in GCC Bugzilla, Wolfgang Bangerth mentions
something that alerts me of some real technical difficulties (and
possibly the reason why the C++ committe decided the current
behaviour?).  Maybe I can summarize it this way (my words):

Since most compilers do not verify code validity until instantiated (I
think), it is hard to differentiate an instantiation error from a
program error.  And thus my suggestion can result in an incorrect
template function never recognized as an error.

Comments please.

Best regards,

Yongwei

---
[ 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                       ]



