|
Boost : |
Subject: Re: [boost] Is there interest in typeid(TYPE).name() like function that does not require RTTI
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2012-05-30 13:56:27
2012/5/30 Abel Sinkovics <abel_at_[hidden]>:
> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk