[PATCH] Allow compiling with gcc 2.95

Richard Guenther rguenth at tat.physik.uni-tuebingen.de
Fri Jan 10 23:58:18 UTC 2003


Hi!

The following patch allows compiling with gcc 2.95 (dont know if this is a
good idea - could not test whole testsuite because compilation aborts with
out of memory).

Ok?

Richard.

2002Jan11  Richard Guenther <richard.guenther at uni-tuebingen.de>

	* src/Field/FieldCentering.h: honour
	POOMA_NO_TEMPLATEFUNC_DEFAULTARGS.

Index: src/Field/FieldCentering.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/FieldCentering.h,v
retrieving revision 1.3
diff -u -r1.3 FieldCentering.h
--- src/Field/FieldCentering.h	5 Oct 2001 01:19:07 -0000	1.3
+++ src/Field/FieldCentering.h	10 Jan 2003 23:56:13 -0000
@@ -538,11 +538,19 @@
 extern const CanonicalCentering<2> canonicalCenteringTwo_g;
 extern const CanonicalCentering<3> canonicalCenteringThree_g;

+#if POOMA_NO_TEMPLATEFUNC_DEFAULTARGS
+template <int Dim>
+const Centering<Dim> canonicalCentering
+    (const enum CenteringType type,
+     const enum ContinuityType discontinuous,
+     const int dimension);
+#else
 template <int Dim>
 const Centering<Dim> canonicalCentering
     (const enum CenteringType type,
      const enum ContinuityType discontinuous,
      const int dimension = 0);
+#endif

 template <>
 const Centering<1> canonicalCentering<1>
@@ -561,6 +569,16 @@
     (const enum CenteringType type,
      const enum ContinuityType discontinuous,
      const int dimension);
+
+#if POOMA_NO_TEMPLATEFUNC_DEFAULTARGS
+template <int Dim>
+inline const Centering<Dim> canonicalCentering
+    (const enum CenteringType type,
+     const enum ContinuityType discontinuous)
+{
+	return canonicalCentering<Dim>(type, discontinuous, 0);
+}
+#endif

 //-----------------------------------------------------------------------------
 //




More information about the pooma-dev mailing list