From 4881336494417932665
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ab08a3e89d74b8d7
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-05-07 08:48:01 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Hyman Rosen <hyrosen@mail.com>
Newsgroups: comp.std.c++
Subject: Re: Core Language Active Issue #329
Date: Tue,  7 May 2002 15:47:30 GMT
Organization: KBC Financial Products
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3CD6A00D.2080502@mail.com>
References: <3CD19D55.1050804@mail.com> <x9PA8.1887$9W4.932959@news6-win.server.ntlworld.com>
X-Trace: mail2news.demon.co.uk 1020786454 mail2news:13186 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
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)
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0rc1) Gecko/20020417
X-Accept-Language: en-us, en
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cache-Post-Path: master.nyc.kbcfp.com!unknown@mosquito.nyc.kbcfp.com
X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)
Lines: 27
Xref: archiver1.google.com comp.std.c++:11084

Garry Lancaster wrote:
> Actually it won't use either. The default comparison
> operator for std::set is <, not ==.

I'm calling std::find on a sequence.
25.1.2 says that operator== is used.

> We need to make the distinction between declaration
> and definition. It is right that the declaration is visible
> and therefore considered for overload resolution,
> even if the function instantiation has not yet been
> defined.

The declaration itself can involve the template
parameters in such a way that it is legal for some
types and illegal for others. I see no reason to
change the behavior away from what exists currently.
If you must instantiate a template for a type for
which the friends will be incorrect, write a
specialization which doesn't contain them.

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



