
AMDG On 03/25/2016 12:39 AM, Antony Polukhin wrote:
2016-03-25 2:03 GMT+03:00 Klemens Morgenstern <klemens.morgenstern@gmx.net>:
That might also be a workaround for the REGISTER_TYPE thing in you magic get, though I have to admit: I don't really get how this approach works, so I don't know.
That won't help. I need a way to make conversion of T type to some non-templated class and back: T -> int -> T
Does any C++14 compiler allow the friend function registration hack? template<int I> struct id_ {}; template<int I, class T> struct register_type { friend T lookup(id_<I>); }; (I'm pretty sure that this won't work on clang.)
TypeIndex allows only the first part of that: T -> type_index, but does not allow type_index -> T
In Christ, Steven Watanabe