
30 May
2012
30 May
'12
6:10 p.m.
On 29 May 2012 14:29, Antony Polukhin <antoshkka@gmail.com> wrote:
Would be there some interest in function for getting class name without RTTI?
To be clear, this does not do the same thing as RTTI. For instance: struct B { virtual ~B() {} }; struct D : B {}; // ... D d; B& b(d); std::cout << template_type(b) << std::endl; will print B, not D. That being said, this is mighty useful, especially when doing non-trivial things with templates. Now, I'd rather the interface return some kind of range, as there are many times I don't want to pay the allocation cost for putting it in a string. -- Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404