From 5289356237789707031
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,3b5faa9aaea18095
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-10-02 15:14:18 PST
Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: deepblue57x@yahoo.co.nz (Graeme Prentice)
Newsgroups: comp.std.c++
Subject: Re: Problem with function template overload resolution
Date: Thu, 2 Oct 2003 22:14:17 +0000 (UTC)
Lines: 39
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <il9lnv48cn9kv4a4efhrj74kb3uj1i43d1@4ax.com>
References: <4e6fccc6.0309162227.1aa4bda7@posting.google.com> <3F6E975F.8050300@grad.hr> <bkos2l$8t1$1@sunnews.cern.ch> <4e6fccc6.0309231302.4c6a4a9f@posting.google.com> <fur9nvsta83c5et8drf2amoqhhs1lvoqu5@4ax.com> <blcbkh$k0u$1@sunnews.cern.ch>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: mail2news.demon.co.uk 1065132857 20170 10.0.0.1 (2 Oct 2003 22:14:17 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 2 Oct 2003 22:14:17 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 1A5BiB-0005FB-00
	for mail2news@news.news.demon.net; Thu, 02 Oct 2003 22:14:16 +0000
X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU
	id IAA19359; Fri, 3 Oct 2003 08:14:12 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-Orig-NNTP-Posting-Host: 203-96-148-234.apx1.paradise.net.nz (203.96.148.234)
X-Orig-X-Trace: news.uni-berlin.de 1065003361 9208803 203.96.148.234 (16 [98036])
X-Newsreader: Forte Agent 1.93/32.576 English (American)
X-Spam-Status: No, hits=1.3 required=5.0
	tests=HTML_00_10,HTML_MESSAGE,HTML_SHOUTING4,REFERENCES
	version=2.55
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Xref: archiver1.google.com comp.std.c++:19

On Tue, 30 Sep 2003 17:45:45 +0000 (UTC), Patrick.Kowalzick@cern.ch
("Patrick Kowalzick") wrote:

>Here I do not agree. Part 2 says:
>
>Given two overloaded function templates, wheter one is more specialized than
>another can be determined by transforming each template in turn and using
>argument deduction (14.8.2) to compare it to each other.
>
>1. foo() is not overloaded
>2. foo<U> is overloaded
>3. foo<U1,U2> is not overloaded.
>
>So I would use only case 2 which results in same specializaion level. So the
>code could not be compiled.
>

Your comments make no sense so it's difficult to respond to them.

In the original code posted, there are two definitions of the template
function foo, both with a non-empty template parameter list.  Two
template functions with the same name and both with a non empty template
parameter list are overloads of each other.

Case 2 above where you state ... "foo<U> is overloaded" is a nonsense
statement.  foo<U> is a template id.  There is no such thing as an
overloaded template id.  The template function referred to by foo<U> is
overloaded and so is the template function referred to by foo<U1,U2>.

Can you be any clearer about what you're trying to say?

Graeme

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



