
Hi all. I want to make function comparing two typeid's 'const T&'s , but in context I have only two T* pointers. T is abstract class having pure virtual functions. typeid operator takes reference, not pointer. If I use * operator on placeholder (ll_typeid(*_1)==ll_typeid(*_2)) - compiler complains that it could not instantiate T somewhere in some complex template. I also tried to use ll_static_cast in expression, but it didn't help. I don't attach those error messages, but anyway why should T be instantiated to construct L-expression with *(T*)? By the way I made simple functor and it works the way I want, but it's 6 lines long instead of one in_place expr. :
template<typename T> struct compareRefsByTypeID { bool operator()(const T* t1, const T* t2) { return typeid((const T&)(*t1))==typeid((const T&)(*t2)); } };
regards, Roman.