A better return_type_tinfo() mechanism.
[ginac.git] / ginac / add.cpp
index 2fa73dc27d168068294b07bc19979f98454dcbda..547bee32d72b166c2ae95b292cd34b1c1c8455c5 100644 (file)
@@ -498,10 +498,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();
 }