I have two dlls which both declare a templated type, let's call A. If the declaration of A is sufficiently intricate, it happens that the result of typeid(A).name() is different when called in functions in two different dll's.
example:
DLL1:
struct MyType: public A< TEMPLATE_LIST_OF_A >{}
void f(){
std::string name1 = typeid(A).name();
}
DLL2:
struct MyType: public A< TEMPLATE_LIST_OF_A >{}
void f(){
std::string name2 = typeid(A).name();
}
for example name1 could be something like: "???MyType??? etc" while name2 could be "???A??TEMPLATE_LIST_OF_A etc".
Which actually makes quite sense to me, but is there is a way, provided that the names used are the samem to guarantee that name1==name2 ?
thanks, rob
See Question&Answers more detail:os