
Guess someone why this code fails ? (g++3.3) ---- begin ----------------------- #include <boost/type_traits.hpp> #include <iostream> using namespace std; using namespace boost; int foo() { return 10; } template <typename FnType, FnType* fn, int Arity = function_traits<FnType>::arity> struct Translator; template <typename FnType, FnType* fn> struct Translator<FnType, fn, 0> : function_traits<FnType> { typedef result_type type; }; int main(int argc, char** argv) { Translator<int (), &foo>::type x; } ------------------- end code ------------------ error: ISO C++ forbids declaration of `result_type' with no type --------------------- end error ------------------- And another question: is there a portable equivalent to: Translator<typeof(foo), &foo> Thanks ______________________________________________ Renovamos el Correo Yahoo!: ¡100 MB GRATIS! Nuevos servicios, más seguridad http://correo.yahoo.es