]> www.ginac.de Git - ginac.git/blobdiff - ginac/add.cpp
Univariate Hensel lifting now uses upoly.
[ginac.git] / ginac / add.cpp
index 98e8c798e206763a5cb8965d75b12db543bd8493..06ada496cfbe3c7ad999081eb6e702089751d69d 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's sums of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -49,7 +49,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(add, expairseq,
 
 add::add()
 {
-       tinfo_key = &add::tinfo_static;
 }
 
 //////////
@@ -60,7 +59,6 @@ add::add()
 
 add::add(const ex & lh, const ex & rh)
 {
-       tinfo_key = &add::tinfo_static;
        overall_coeff = _ex0;
        construct_from_2_ex(lh,rh);
        GINAC_ASSERT(is_canonical());
@@ -68,7 +66,6 @@ add::add(const ex & lh, const ex & rh)
 
 add::add(const exvector & v)
 {
-       tinfo_key = &add::tinfo_static;
        overall_coeff = _ex0;
        construct_from_exvector(v);
        GINAC_ASSERT(is_canonical());
@@ -76,7 +73,6 @@ add::add(const exvector & v)
 
 add::add(const epvector & v)
 {
-       tinfo_key = &add::tinfo_static;
        overall_coeff = _ex0;
        construct_from_epvector(v);
        GINAC_ASSERT(is_canonical());
@@ -84,7 +80,6 @@ add::add(const epvector & v)
 
 add::add(const epvector & v, const ex & oc)
 {
-       tinfo_key = &add::tinfo_static;
        overall_coeff = oc;
        construct_from_epvector(v);
        GINAC_ASSERT(is_canonical());
@@ -92,7 +87,6 @@ add::add(const epvector & v, const ex & oc)
 
 add::add(std::auto_ptr<epvector> vp, const ex & oc)
 {
-       tinfo_key = &add::tinfo_static;
        GINAC_ASSERT(vp.get()!=0);
        overall_coeff = oc;
        construct_from_epvector(*vp);
@@ -103,7 +97,7 @@ add::add(std::auto_ptr<epvector> vp, const ex & oc)
 // archiving
 //////////
 
-DEFAULT_ARCHIVING(add)
+GINAC_BIND_UNARCHIVER(add);
 
 //////////
 // functions overriding virtual functions from base classes
@@ -498,10 +492,10 @@ unsigned add::return_type() const
                return seq.begin()->rest.return_type();
 }
 
-tinfo_t add::return_type_tinfo() const
+return_type_t add::return_type_tinfo() const
 {
        if (seq.empty())
-               return this;
+               return make_return_type_t<add>();
        else
                return seq.begin()->rest.return_type_tinfo();
 }