This is the mail archive of the
mailing list for the GCC project.
Re: c++/4047: assuming & on overloaded member functions
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Subject: Re: c++/4047: assuming & on overloaded member functions
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Wed, 22 Aug 2001 11:39:45 +0100
- CC: Yu Zhang/CanWest/IBM <yuzhang at ca dot ibm dot com>, Phil Edwards <pedwards at disaster dot jaj dot com>, gcc at gcc dot gnu dot org
- Organization: Codesourcery LLC
- References: <OF300A8A95.636C4469-ON85256AAF.005B61A9@mkm.can.ibm.com> <email@example.com>
Gabriel Dos Reis wrote:
> "Yu Zhang/CanWest/IBM" <firstname.lastname@example.org> writes:
> | Hi Phil,
> | Thank you very much. It does work! But I'm confused,
> | which one is C++ standard?
> | server.use(T::foo); or server.use(&T::foo); ?
This is correct to pointer to (non-static) member function. In Yu's
case, T::foo is a static member, so the & is optional. Confusing, n'est pas?
2.95 got this wrong when T::foo was overloaded.
For the record, refer to [5.3.1]/2 on how to form a pointer to member.
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
email@example.com : http://www.cs.bris.ac.uk/~nathan/ : firstname.lastname@example.org