]> www.ginac.de Git - ginac.git/blobdiff - ginac/expairseq.h
* Supplement some (now deprecated) macros by inlined template functions:
[ginac.git] / ginac / expairseq.h
index 0bfd2ed6f9df8c7fc83d1bac9e72dea8af0e1d60..9865586c4e906b3df3f26e0fb4436602d8b85fdc 100644 (file)
@@ -188,11 +188,20 @@ protected:
 };
 
 // utility functions
+
+/** Return the expairseq object handled by an ex.
+ *  This is unsafe: you need to check the type first. */
 inline const expairseq &ex_to_expairseq(const ex &e)
 {
        return static_cast<const expairseq &>(*e.bp);
 }
 
+/** Specialization of is_exactly_a<expairseq>(obj) for expairseq objects. */
+template<> inline bool is_exactly_a<expairseq>(const basic & obj)
+{
+       return obj.tinfo()==TINFO_expairseq;
+}
+
 } // namespace GiNaC
 
 #endif // ndef __GINAC_EXPAIRSEQ_H__