From -2554465497022757833
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ec3337d9f2b7ae74
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1993-12-03 16:49:58 PST
Newsgroups: comp.std.c++
Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!olivea!sgigate.sgi.com!sgiblab!rtech!amdahl!netcomsv!netcom.com!rfg
From: rfg@netcom.com (Ronald F. Guilmette)
Subject: Re: Is a member function a function? (was Re: Q: va_end in C++?)
Message-ID: <rfgCHHDF0.Jxn@netcom.com>
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
References: <CGvLEo.wD@ses.com> <rfgCH85x3.Hs@netcom.com> <CHFBxp.5M4@ses.com>
Date: Fri, 3 Dec 1993 22:35:24 GMT
Lines: 62

In article <CHFBxp.5M4@ses.com> jamshid@castro.uucp (Jamshid Afshar) writes:
>In article <rfgCH85x3.Hs@netcom.com>,
>Ronald F. Guilmette <rfg@netcom.com> wrote:
>>>The term "function" includes member functions.
>>
>>Jamshid, I do not share your view in this case.
>>
>>In general, it appears to me that both the ARM and current X3J16 working
>>paper are very explicit in specifying whether any given rule applies to
>>either "functions" or "member functions".  I do not think that the latter
>>is considered a subset of the former.  Rather, the ARM and the X3J16 WP
>>seem (in general) to treat these as two entirely disjoint sets.
>
>Can you provide examples where the ARM/WP treat functions and member
>functions as disjoint sets?

Yes.

See section 4.6 (Pointer Conversions) and then look at section 4.8
(Pointer to Members).

See section 5.2.2 (Function Calls).

See sections 14.4 (Function Templates) and also 14.6 (Member Function
Templates).

The final piece of evidence I'll provide today is section 5.9 (Relational
comparisons) of the 09/28/93 X3J16 working paper wherein it is made quite
plain that pointers to functions may be (relationally) compared whereas
pointers to member functions may not be.  (This point may not be apparent 
however until one reads the following section (5.10; Equality comparisons)
wherein it is made apparent that equality comparisons *may* be performed
between two compatible pointers to member functions.

>I see a lot of wording like 7.1.2's
>"[inline and virtual] can be used only in function declarations"...

Yes.  Quite so.

>I don't see how you can interpret this as my "view".  I don't know
>what else to say other than to repeat the quotes from my previous
>article:
>
>>>The term "function" includes member functions.  9.3: "A function
>>>declared as a member ... is called a member function."

I agree completely that this statement, along with several others, add
credence to the notion that member functions should be considered to be
a subset of "functions" rather than as an entirely disjoint set.  I would
say however that the wording in the sections of the ARM/WP that I have
mentioned above lead one to the opposite view.

In short, both the ARM and the WP appear to be internally inconsistant
with respect to the use of the terms "function" and "member function".
We can only hope that such inconsistancies will be rectified in the final
standard.

-- 

-- Ronald F. Guilmette, Sunnyvale, California -------------------------------
------ domain address: rfg@netcom.com ---------------------------------------
------ uucp address: ...!uunet!netcom.com!rfg -------------------------------


