]> www.ginac.de Git - ginac.git/blobdiff - ginac/add.cpp
Add rvalue reference ctors from epvectors for add, mul.
[ginac.git] / ginac / add.cpp
index 2a2e2f8310fa56217c4e52934f0399d76f7b3108..79994e11c5ddf47e54b84daf883b014b1f1410a4 100644 (file)
@@ -86,6 +86,13 @@ add::add(const epvector & v, const ex & oc)
        GINAC_ASSERT(is_canonical());
 }
 
+add::add(epvector && vp)
+{
+       overall_coeff = _ex0;
+       construct_from_epvector(std::move(vp));
+       GINAC_ASSERT(is_canonical());
+}
+
 add::add(epvector && vp, const ex & oc)
 {
        overall_coeff = oc;
@@ -492,7 +499,7 @@ ex add::derivative(const symbol & y) const
        for (auto & it : seq)
                s.push_back(expair(it.rest.diff(y), it.coeff));
 
-       return dynallocate<add>(std::move(s), _ex0);
+       return dynallocate<add>(std::move(s));
 }
 
 int add::compare_same_type(const basic & other) const