From -5362237445085837051
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ccb40040597f37a7
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-03-12 10:46:17 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: kgwzamboni-news@zambonistiscan.com
Newsgroups: comp.std.c++
Subject: Re: Extending enums (was Re: Forward declaration of enum)
Date: Wed, 12 Mar 2003 18:46:17 +0000 (UTC)
Organization: Solution Technology
Lines: 29
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <PNE21WKuwwiy-pn2-d7mJUChdGycl@zamboni.stiscan.com>
References: <PNE21WKuwwiy-pn2-2YXh1K9td7dn@zamboni.stiscan.com> <memo.20030310212425.56925C@brangdon.madasafish.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
X-Trace: mail2news.demon.co.uk 1047494777 9889 10.0.0.1 (12 Mar 2003 18:46:17 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 12 Mar 2003 18:46: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 18tBF1-0002Z4-00
	for mail2news@news.news.demon.net; Wed, 12 Mar 2003 18:46:16 +0000
X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU
	id FAA06850; Thu, 13 Mar 2003 05:46:12 +1100 (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++@ncar.ucar.edu
X-Newsgroups: comp.std.c++
X-User-Agent: ProNews/2 V1.52.cp012
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly.
X-NNTP-Posting-Date: Mon, 10 Mar 2003 21:16:36 EST
X-MailScanner: PASSED (v1.2.7 91397 h2B2Pmq3095747 mailbox2.ucsd.edu)
X-Spam-Status: No, hits=-13.2 required=5.0
	tests=EMAIL_ATTRIBUTION,NOSPAM_INC,NO_REAL_NAME,
	      QUOTED_EMAIL_TEXT,REFERENCES,SIGNATURE_SHORT_DENSE,
	      SPAM_PHRASE_00_01,USER_AGENT
	version=2.41
Xref: archiver1.google.com comp.std.c++:18270

On Mon, 10 Mar 2003 21:44:20 UTC, brangdon@cix.co.uk (Dave Harris) wrote:

 
> we first figure out the type of a and b, and then figure out which
> func() is the best match. If we have as enum name which depends on 
> context, then:
>     func( orange );
> 
> we go in the opposite direction: figure out which func() to use and
> then figure out which version of orange it wants. If we have both
> kinds of overloading, we don't really know where to start.
> 

When the compiler looks up Orange and it sees more than one
it considers all of them and looks up "func".
If it finds more than one match, it is ambiguous.
Otherwise it knows which enum was meant.
Not any worse than template lookup.

-- 
Remove zamboni to reply.
All the above is hearsay and the not quaranteed.

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



