Phil Carmody Guest
|
Posted: Thu Sep 25, 2003 1:50 pm Post subject: brackets issue specifying ::*s |
|
|
Greetings all,
I've always been a bit of a excessive bracketer, and have recently
been stung by g++-3.0 barfing
"kbitmap.c:161: address of overloaded function with no contextual type information"
at:
commit =
(kremoval==1) ? &(kbitmap::commit1)
: (kremoval==2) ? &(kbitmap::commit2)
: &(kbitmap::commitmany);
2.95 was quite happy with it, for example. (They're just member
functions with identical type, and commit is pointer to same,
obviously.)
I can 'fix' it simply by changing to
commit =
(kremoval==1) ? &kbitmap::commit1
: (kremoval==2) ? &kbitmap::commit2
: &kbitmap::commitmany;
Is this a g++ quirk, or is there genuinely something different between
"class::method" and "(class::method)"?
They'll be adding white-space sensitivity next!?!?
Phil
(yes, I know! )
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|