I have two dll libraries that declare a template type, call A. If the declaration of A is quite complicated, it happens that the result of typeid (A) .name () is different when calling functions in two different DLL files.
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 may be "???? TEMPLATE_LIST_OF_A etc.".
Which actually makes sense to me, but is there a way, provided the names used are the samem, to ensure that name1 == name2?
thanks rob
source
share