freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Allow compiling with gcc 2.95


From: Richard Guenther
Subject: [PATCH] Allow compiling with gcc 2.95
Date: Sat, 11 Jan 2003 00:58:18 +0100 (CET)

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 <address@hidden>

        * 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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]