]> www.ginac.de Git - ginac.git/commitdiff
[DEBUG] Make some debug output operators compile in factor.cpp...
authorRichard Kreckel <kreckel@ginac.de>
Mon, 14 Nov 2022 22:05:47 +0000 (23:05 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 14 Nov 2022 22:05:47 +0000 (23:05 +0100)
...for the case when somebody actually #defines DEBUGFACTOR. The operators
must be in the same anonymous namespace in which umodpoly, upoly and upvec
are typedef'ed. (I'm not really sure I understand why but that's what GCC
and CLang are convinced of.)

ginac/factor.cpp

index fde15b32841e16547815a552f69099bce690dac7..d0d9ce038baba72ea3222afa58c1d71e0c53680c 100644 (file)
@@ -80,6 +80,9 @@ using namespace cln;
 
 namespace GiNaC {
 
+// anonymous namespace to hide all utility functions
+namespace {
+
 #ifdef DEBUGFACTOR
 #define DCOUT(str) cout << #str << endl
 #define DCOUTVAR(var) cout << #var << ": " << var << endl
@@ -133,9 +136,6 @@ ostream& operator<<(ostream& o, const vector<vector<cl_MI>>& v)
 #define DCOUT2(str,var)
 #endif // def DEBUGFACTOR
 
-// anonymous namespace to hide all utility functions
-namespace {
-
 ////////////////////////////////////////////////////////////////////////////////
 // modular univariate polynomial code