This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c++/4047: assuming & on overloaded member functions
- To: Yu Zhang/CanWest/IBM <yuzhang at ca dot ibm dot com>
- Subject: Re: c++/4047: assuming & on overloaded member functions
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Mon, 20 Aug 2001 15:40:58 -0400
- Cc: gcc at gcc dot gnu dot org
- References: <OFFAA6A68E.026F213D-ON85256AAB.00751BF5@mkm.can.ibm.com>
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