X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fbasic.cpp;h=eb2c85dfb5989d1d439e8840cf9046a1d4ebe90b;hp=a2e10f715531d286c0d3fef0a0a13a4e5cc8d18a;hb=276f1bc79bd0f41a12fb45ece6c7857e13c6668e;hpb=5954e1a6b131f6f10c1ed96766af7acbd350d8bb diff --git a/ginac/basic.cpp b/ginac/basic.cpp index a2e10f71..eb2c85df 100644 --- a/ginac/basic.cpp +++ b/ginac/basic.cpp @@ -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