
2012/5/30 Abel Sinkovics <abel@elte.hu>:
Hi Antony,
Hi,
Would be there some interest in function for getting class name without RTTI?
We've been using similar solutions for unit testing template metaprograms ... So a way of getting a class name could improve this solution.
I`ve implemented an almost full featured type_info that does not use RTTI and returns pretty-printing names. Now you can use it like: typedef mpl::equal_to<mpl::int_<11>, metafunction_to_test<mpl::int_<13> >::type> mpl_eq_lazy_result; std::cout << get_template_info<mpl_eq_lazy_result>().name_demangled(); // shall output boost::mpl::equal_to<mpl_::int_<11>, mpl_::int_<20> > on MSVC I`ve started a new thread called '[boost] Is there interest in copyable type_info that does not require RTTI (was: Is there interest in typeid(TYPE).name() like function that does not require RTTI)', I`ll clean up the code and commit it at this or next week. -- Best regards, Antony Polukhin