From: Richard Kreckel Date: Fri, 11 May 2001 14:16:11 +0000 (+0000) Subject: * Zapped header dependency from . X-Git-Tag: release_0-8-3~8 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=7ece13ddcc174e28b7b333e5d09900bc90f3dd78;ds=sidebyside * Zapped header dependency from . --- diff --git a/ginac/numeric.h b/ginac/numeric.h index 2d856aaa..4f2ba1a1 100644 --- a/ginac/numeric.h +++ b/ginac/numeric.h @@ -23,7 +23,6 @@ #ifndef __GINAC_NUMERIC_H__ #define __GINAC_NUMERIC_H__ -#include #include "basic.h" #include "ex.h" diff --git a/ginac/utils.h b/ginac/utils.h index 79719feb..6edea866 100644 --- a/ginac/utils.h +++ b/ginac/utils.h @@ -24,10 +24,17 @@ #ifndef __GINAC_UTILS_H__ #define __GINAC_UTILS_H__ -#include +#include "config.h" + #include #include -#include "config.h" +#if defined(HAVE_SSTREAM) +#include +#elif defined(HAVE_STRSTREAM) +#include +#else +#error Need either sstream or strstream +#endif #include "assertion.h" namespace GiNaC { @@ -36,9 +43,15 @@ namespace GiNaC { template std::string ToString(const T & t) { +#if defined(HAVE_SSTREAM) + std::ostringstream buf; + buf << t << std::ends; + return buf.str(); +#else char buf[256]; std::ostrstream(buf,sizeof(buf)) << t << std::ends; return buf; +#endif } /** Exception class thrown by classes which provide their own series expansion