// Convert the lists to a map
exmap m;
for (lst::const_iterator its = ls.begin(), itr = lr.begin(); its != ls.end(); ++its, ++itr) {
- m[*its] = *itr;
+ m.insert(std::make_pair(*its, *itr));
// Search for products and powers in the expressions to be substituted
// (for an optimization in expairseq::subs())
if (e.info(info_flags::relation_equal)) {
exmap m;
const ex & s = e.lhs();
- m[s] = e.rhs();
+ m.insert(std::make_pair(s, e.rhs()));
if (is_exactly_a<mul>(s) || is_exactly_a<power>(s))
options |= subs_options::pattern_is_product;
return bp->subs(m, options);
if (!r.info(info_flags::relation_equal))
throw(std::invalid_argument("basic::subs(ex): argument must be a list of equations"));
const ex & s = r.lhs();
- m[s] = r.rhs();
+ m.insert(std::make_pair(s, r.rhs()));
// Search for products and powers in the expressions to be substituted
// (for an optimization in expairseq::subs())
// because subs() is not recursive
ex es = (new symbol)->setflag(status_flags::dynallocated);
ex e_replaced = e.subs(repl, subs_options::no_pattern);
- repl[es] = e_replaced;
- rev_lookup[e_replaced] = es;
+ repl.insert(std::make_pair(es, e_replaced));
+ rev_lookup.insert(std::make_pair(e_replaced, es));
return es;
}