c++.rtl - std::type_info: minor standards compliance issue
-
Christof Meerwald
(20/20)
Jun 05 2003
#include
#include <typeinfo> typedef const char * (std::type_info::*func)() const; int main() { const std::type_info &ti = typeid(int); func f = &std::type_info::name; return 0; } In my opinion, this should compile with a standards compliant compiler, but DM complains: func f = &std::type_info::name; ^ Error: need explicit cast to convert from: char const *( std::type_info::*C func)()const to : char const *( std::type_info::*member func)()const bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
Jun 05 2003