[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC, problem with g++4



On Fri, Jul 29, 2005 at 10:55:36AM +0300, Jaakko Niemi wrote:
>  Hello,
> 
>  /usr/include/sys/socket.h has this:
 
[anonymous enum def]
 
> rexchan.C:254: error: no matching function for call to 'wrap(unixfd*
> const, void (unixfd::*)(int, int), <anonymous enum>)'
> 
>  rexchan.C:254 is:
> 
> paios_out->setwcb (wrap (this, &unixfd::update_connstate, SHUT_WR));
> 
>  Now, should libc name that enumeration, g++ generate warning instead
> of error or moon be mined for cheese snacks?

Either the first or the third option. The C++ standard clearly says
you cannot use an anonymous type as a template argument.

One option would be to make wrap take an int always, if that's
feasible. Or long. Or unsigned versions of those.



-- 
Petri Latvala

Attachment: signature.asc
Description: Digital signature


Reply to: