]> www.ginac.de Git - ginac.git/blobdiff - ginac/basic.cpp
- Instead of just totally symmetric or antisymmetric, complex symmetries
[ginac.git] / ginac / basic.cpp
index a2e10f715531d286c0d3fef0a0a13a4e5cc8d18a..eb2c85dfb5989d1d439e8840cf9046a1d4ebe90b 100644 (file)
@@ -232,7 +232,7 @@ bool basic::has(const ex & other) const
 
 /** Construct new expression by applying the specified function to all
  *  sub-expressions (one level only, not recursively). */
-ex basic::map(map_func f) const
+ex basic::map(map_function & f) const
 {
        unsigned num = nops();
        if (num == 0)
@@ -368,8 +368,12 @@ ex basic::evalm(void) const
 {
        if (nops() == 0)
                return *this;
-       else
-               return map(GiNaC::evalm);
+       else {
+               struct evalm_map_function : public map_function {
+                       ex operator()(const ex & e) { return GiNaC::evalm(e); }
+               } fcn;
+               return map(fcn);
+       }
 }
 
 /** Perform automatic symbolic evaluations on indexed expression that