mem_fun_ref: parens in reference of function

T

tibirna

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
 
T

Thomas Tutone

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top