From: Richard Kreckel Date: Fri, 11 Mar 2005 00:54:20 +0000 (+0000) Subject: * Fix some language conformance issues needed for GCC 4.0 X-Git-Tag: release_1-4-0~189 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=e8c6a2891bc68ca8f97a7d4b8bd0dd3ac322d982;ds=sidebyside * Fix some language conformance issues needed for GCC 4.0 (c.f. Debian Bug#298400). --- diff --git a/check/exam_structure.cpp b/check/exam_structure.cpp index 8d80a7b1..fa83e418 100644 --- a/check/exam_structure.cpp +++ b/check/exam_structure.cpp @@ -47,13 +47,13 @@ inline ex make_sprod(const ex & l, const ex & r) return sprod(sprod_s(l, r)); } -void sprod::print(const print_context & c, unsigned level) const +template <> void sprod::print(const print_context & c, unsigned level) const { const sprod_s & sp = get_struct(); c.s << "<" << sp.left << "|" << sp.right << ">"; } -ex sprod::eval(int level) const +template <> ex sprod::eval(int level) const { // symmetric scalar product const sprod_s & sp = get_struct(); diff --git a/ginac/exprseq.cpp b/ginac/exprseq.cpp index 709e543d..2024f3d1 100644 --- a/ginac/exprseq.cpp +++ b/ginac/exprseq.cpp @@ -29,7 +29,7 @@ template <> GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(exprseq, basic, print_func(&exprseq::do_print_tree)) /** Specialization of container::info() for exprseq. */ -bool exprseq::info(unsigned inf) const +template <> bool exprseq::info(unsigned inf) const { if (inf == info_flags::exprseq) return true; diff --git a/ginac/inifcns.h b/ginac/inifcns.h index 9a15bc67..3230abac 100644 --- a/ginac/inifcns.h +++ b/ginac/inifcns.h @@ -108,7 +108,7 @@ inline function zeta(const T1& p1, const T2& p2) { return function(zeta2_SERIAL::serial, ex(p1), ex(p2)); } class zeta_SERIAL; -template<> inline bool is_the_function(const ex& x) +template<> inline bool is_the_function(const ex& x) { return is_the_function(x) || is_the_function(x); } @@ -127,7 +127,7 @@ inline function G(const T1& x, const T2& s, const T3& y) { return function(G3_SERIAL::serial, ex(x), ex(s), ex(y)); } class G_SERIAL; -template<> inline bool is_the_function(const ex& x) +template<> inline bool is_the_function(const ex& x) { return is_the_function(x) || is_the_function(x); } @@ -162,7 +162,7 @@ inline function psi(const T1 & p1, const T2 & p2) { return function(psi2_SERIAL::serial, ex(p1), ex(p2)); } class psi_SERIAL; -template<> inline bool is_the_function(const ex & x) +template<> inline bool is_the_function(const ex & x) { return is_the_function(x) || is_the_function(x); } diff --git a/ginac/lst.cpp b/ginac/lst.cpp index 1c33cd6d..0621ce68 100644 --- a/ginac/lst.cpp +++ b/ginac/lst.cpp @@ -29,7 +29,7 @@ template <> GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(lst, basic, print_func(&lst::do_print_tree)) /** Specialization of container::info() for lst. */ -bool lst::info(unsigned inf) const +template <> bool lst::info(unsigned inf) const { if (inf == info_flags::list) return true; diff --git a/ginac/structure.h b/ginac/structure.h index 1932c0f3..22e68400 100644 --- a/ginac/structure.h +++ b/ginac/structure.h @@ -27,6 +27,7 @@ #include "ex.h" #include "ncmul.h" +#include "numeric.h" #include "operators.h" #include "print.h"