Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > mem_fun_ref: parens in reference of function

Reply
Thread Tools

mem_fun_ref: parens in reference of function

 
 
tibirna@gmail.com
Guest
Posts: n/a
 
      02-03-2006
Hello

mem_fun_ref(&(std::list<int>::size))

is compiled as valid by gcc 3.3.4 and causes an error ("defined-id
needed") with gcc 4.0.2. The later requires

mem_fun_ref(&std::list<int>::size)

Is there a some subtle issue that the compiler has to comply with when
it refuses the parens? Or is this a compiler bug?

Thanks

 
Reply With Quote
 
 
 
 
Thomas Tutone
Guest
Posts: n/a
 
      02-03-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> mem_fun_ref(&(std::list<int>::size))
>
> is compiled as valid by gcc 3.3.4 and causes an error ("defined-id
> needed") with gcc 4.0.2. The later requires
>
> mem_fun_ref(&std::list<int>::size)
>
> Is there a some subtle issue that the compiler has to comply with when
> it refuses the parens? Or is this a compiler bug?


Comeau agrees with gcc 4.0.2, so it seems likely that 4.0.2 is correct.

Best regards,

Tom

 
Reply With Quote
 
 
 
 
tibirna@gmail.com
Guest
Posts: n/a
 
      02-03-2006
ICC 8.1 accepts the first form no problem

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this a bug? Nonmatching capturing parens in regexp in replace with function are not undefined in Firefox Bart Lateur Javascript 2 09-03-2007 03:40 PM
[OT] PerlTidy option to close parens on function params *only* newsbot@cox.net Perl Misc 0 05-02-2005 08:00 PM
How to avoid "f.close" (no parens) bug? Stephen Ferg Python 12 02-13-2004 06:40 AM
RE: How to avoid "f.close" (no parens) bug? Batista, Facundo Python 2 02-11-2004 09:28 PM
RE: How to avoid "f.close" (no parens) bug? Batista, Facundo Python 2 02-11-2004 07:54 PM



Advertisments