This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/4047: assuming & on overloaded member functions


Gabriel Dos Reis wrote:
> 
> "Yu Zhang/CanWest/IBM" <yuzhang@ca.ibm.com> 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); ?
> 
> &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.

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]