Hi,
Yes you are right. I compiled it with gcc-3.4 and
everything fine. Version gcc-4.1 gives me the error.
I will send a bug-report.
Thanks alot for your help!
Andrej
--- Joaquín Mª López Muñoz
Andrej van der Zee ha escrito:
Hi,
Thanks for your fast feedback and sorry for the lack of information I gave you in my last email.
I stripped down everything I could and found the problem. There are two overloaded member functions and somehow in a template-context, the compiler gets confused. Is there any way to solve this without renaming one of the methods?
The compiler should do this automatically without you having to disambiguate the overload, see 14.3.2/5:
"For a non-type template-parameter of type pointer to member function, no conversions apply. If the template-argument represents a set of overloaded member functions, the matching member function is selected from the set (13.4)."
Below the stripped down version of main.cpp that doesn't compile.[...]
This program compiles fine with GCC 3.2 and Comeau C++ 4.3.9. I think you've got a compiler bug, you might want to report it to
Anyway, the following might be a workaround (I don't have your GCC version to try myself):
mi::const_mem_fun< field_ts, ts_type, (ts_type (field_ts::*)()const)&field_ts::ts>
HTH,
Joaquín M López Muñoz Telefónica, Inevstigación y Desarrollo
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com