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

Gabriel Dos Reis gdr@codesourcery.com
Wed Aug 22 03:43:00 GMT 2001


Nathan Sidwell <nathan@codesourcery.com> writes:

| 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.

I stand corrected.  I missed the 'static' bit.

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com



More information about the Gcc mailing list