From 4983770523224732811
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,9d57bb38940f08c2
X-Google-Attributes: gidf78e5,public
From: clamage@Eng.Sun.COM (Steve Clamage)
Subject: Re: References to functions allowed?
Date: 1999/01/20
Message-ID: <782e8n$756$1@engnews2.Eng.Sun.COM>#1/1
X-Deja-AN: 434724449
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <36A222B3.E51DFD28@ibm.net> <OxDGwfArQyo2EwCV@robinton.demon.co.uk> <xajr9ssr1qx.fsf@korrigan.inria.fr> <780f6f$kjs$1@engnews2.Eng.Sun.COM> <36A3CA3A.C33862DF@ibm.net>
X-Original-Date: 19 Jan 1999 17:09:43 GMT
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 916816740 11067 128.250.29.16 (20 Jan 1999 07:19:00 GMT)
Organization: Sun Microsystems Inc., Mountain View, CA
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANqWDVeEDnX0m9pzZAQGnIQF+K8GvD69oyBlrkFUGnJMsL8ztDj2okBC5 pNHpbwUr/tvVaohKPLYIXhn7pmQ01+wy =cumj
NNTP-Posting-Date: 20 Jan 1999 07:19:00 GMT
Newsgroups: comp.std.c++

Biju Thomas <bijuthom@ibm.net> writes:

>Steve Clamage wrote:
>> 
>> Sections 3.9.2 and 8.3.2 mention references to functions, and
>> section 8.5.3 gives this example of a reference to function:
>> 
>>     int (&rg)(int) = g; // rg refers to the function g
>> 

>Okay, thanks.

>What about references to members functions and references to member
>data.

It appears that references to (non-static) members are not allowed.
A pointer-to-(non-static)-member is a special category of type.
It is not like an ordinary pointer to an object or function.
It has special rules.

--
Steve Clamage, stephen.clamage@sun.com
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html              ]



