]> www.ginac.de Git - ginac.git/blobdiff - ginac/clifford.h
* Supplement some (now deprecated) macros by inlined template functions:
[ginac.git] / ginac / clifford.h
index 2877b881b3dffd1d34f57daf400b68c7248dca8e..9d429dca1ee7ccf0d4c7b50bd9b2902e7dba805d 100644 (file)
@@ -101,11 +101,19 @@ public:
 
 
 // global functions
+
+/** Return the clifford object handled by an ex.
+ *  This is unsafe: you need to check the type first. */
 inline const clifford &ex_to_clifford(const ex &e)
 {
        return static_cast<const clifford &>(*e.bp);
 }
 
+/** Specialization of is_exactly_a<clifford>(obj) for clifford objects. */
+template<> inline bool is_exactly_a<clifford>(const basic & obj)
+{
+       return obj.tinfo()==TINFO_clifford;
+}
 
 /** Create a Clifford unity object.
  *