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


On Fri, Aug 17, 2001 at 02:31:38PM -0700, Yu Zhang/CanWest/IBM wrote:
> I've just submitted a bug report c++/4047. I'm wondering if anybody else
> has encountered the same problem before. Is there any quick fix for 2.95.x?
[...]
> >Description:
> when we use an overloaded static member function as
> another function's input argument, g++ report "assuming
> & on overloaded member functions".
[...]
>   void call()
>   {
>     server.use(T::foo);
>   };

What's the problem with just writing

    server.use(&T::foo);

instead?  This is specifically allowed by the C++ standard, and would work
under both versions.


Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC


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