]> www.ginac.de Git - ginac.git/blobdiff - ginac/basic.h
is_exactly_a: use typeid() to check the type of expression.
[ginac.git] / ginac / basic.h
index ffc508dbee0dd48ae4b4d6e18b18b96a4f68b1da..304adcfab2ee7c9d757d02feccbbe4415504535e 100644 (file)
@@ -27,6 +27,7 @@
 #include <vector>
 #include <set>
 #include <map>
+#include <typeinfo> // for typeid
 // CINT needs <algorithm> to work properly with <vector>
 #include <algorithm>
 
@@ -306,7 +307,7 @@ inline bool is_a(const basic &obj)
 template <class T>
 inline bool is_exactly_a(const basic & obj)
 {
-       return obj.tinfo() == &T::tinfo_static;
+       return typeid(T) == typeid(obj);
 }
 
 } // namespace GiNaC