BTW, I tried the workaround, but the compiler doesn't
accept this (invalid template arguments). Doesn't
matter, I solved it with another method invoking the
former until Debian decides to ship a new compiler...
Cheers,
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
___________________________________________________________ Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.htm...