From 7109363407502320866
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,2011c154e12ede7e
X-Google-Attributes: gidf78e5,public
From: vandevod@cs.rpi.edu (David Vandevoorde)
Subject: Re: inconsistance in over.over
Date: 1996/02/01
Message-ID: <xson373y8p4.fsf@avs.cs.rpi.edu>#1/1
X-Deja-AN: 137519730
references: <4eo2mk$7tc@boy.nmd.msu.ru>
x-original-date: 31 Jan 1996 23:24:23 -0500
organization: RPI Computer Science
x-auth: PGPMoose V1.1 PGP comp.std.c++
newsgroups: comp.std.c++

>>>>> "AK" == Alexander Krotoff <krotoff@such.srcc.msu.su> writes:
[...]
AK> There is small inconsistance in the Oct 95 WP:
AK> -----------------------------------------------------------------------
AK> 13.4	Address of overloaded function	[over.over]
AK> In the example on the end of the section:

AK> 	int (X::*p5)(int)  = &(X::f);	// error: wrong syntax for</B>
AK> 					// pointer to member</B>
AK> 	int    (*p6)(long) = &(X::f);	// OK</B>1

AK> Error: qualified-id enclosed in parentheses.
AK> -----------------------------------------------------------------------
AK> 5.3.1	Unary operators			[expr.unary.op]

AK> 3	A pointer to member is only formed when an explicit & is used and
AK> 	its operand is a qualified-id not enclosed in parentheses.
AK> -----------------------------------------------------------------------

AK> I suppose the error is in the over.over.

I fail to see the problem. 5.3.1 (which you quote correctly) says that
&X::f could be a pointer to member, but not &(X::f); so that explains
the error in 13.4. &(X::f) resolves to the pointer to a static member
function (which is a pointer to a regular function) in that same
example, so that's fine. Note that the target type resolves the overload.

	Daveed
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]



