]> www.ginac.de Git - ginac.git/blobdiff - ginac/indexed.h
fixed some -Wall stuff
[ginac.git] / ginac / indexed.h
index 222107081ca3cbeb5449ddf2a11d49f1196aee90..b5a0dcedff199d0773644bc07e53e7ad9a3f1a6d 100644 (file)
@@ -151,6 +151,7 @@ public:
        exvector get_free_indices(void) const;
 
 protected:
+       ex derivative(const symbol & s) const;
        ex thisexprseq(const exvector & v) const;
        ex thisexprseq(exvector * vp) const;
        unsigned return_type(void) const { return return_types::commutative; }
@@ -233,11 +234,20 @@ private:
 
 
 // utility functions
+
+/** Return the indexed object handled by an ex.  Deprecated: use ex_to<indexed>().
+ *  This is unsafe: you need to check the type first. */
 inline const indexed &ex_to_indexed(const ex &e)
 {
        return static_cast<const indexed &>(*e.bp);
 }
 
+/** Specialization of is_exactly_a<indexed>(obj) for indexed objects. */
+template<> inline bool is_exactly_a<indexed>(const basic & obj)
+{
+       return obj.tinfo()==TINFO_indexed;
+}
+
 } // namespace GiNaC
 
 #endif // ndef __GINAC_INDEXED_H__