From e6ef6bac4b0a216a7598ee0fe99e20b0272a27d0 Mon Sep 17 00:00:00 2001 From: kanschat Date: Mon, 23 Oct 2006 22:06:02 +0000 Subject: [PATCH] fix some html errors git-svn-id: https://svn.dealii.org/trunk@14058 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/faq.html | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/deal.II/doc/faq.html b/deal.II/doc/faq.html index 6109458f83..33b95522c6 100644 --- a/deal.II/doc/faq.html +++ b/deal.II/doc/faq.html @@ -125,25 +125,25 @@ c++/616 in October 2000, and it was fixed a few weeks later, but apparently did not make it to Red Hat's version). The problem manifests itself in situations like this: - -
-      template <int dim> struct Function {};
-      template <int dim> struct RHS : Function<dim> { RHS() {}; };
-
-      template <int dim> void f () {
-        const RHS<dim> rhs;
-      };
-      template void f<1> ();
-    
-
- Here, the compiler reports - -
-      x.cc: In function `void f () [with int dim = 1]':
-      x.cc:7:   instantiated from here
-      x.cc:5: uninitialized const `rhs'
-    
-
+

+
+    template <int dim> struct Function {};
+    template <int dim> struct RHS : Function<dim> { RHS() {}; };
+
+    template <int dim> void f ()
+    {
+      const RHS<dim> rhs;
+    };
+    template void f<1> ();
+  
+ +

Here, the compiler reports

+
+    x.cc: In function `void f () [with int dim = 1]':
+    x.cc:7:   instantiated from here
+    x.cc:5: uninitialized const `rhs'
+  
+

which is clearly bogus since rhs uses the default constructor of the class. Unfortunately, there is no way of working around the bug short of removing the constness of the variable. We did not want to do this, since -- 2.39.5