]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make compatible with gcc 4.5.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Apr 2010 21:41:45 +0000 (21:41 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Apr 2010 21:41:45 +0000 (21:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@20956 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/data_out_04.cc
tests/bits/data_out_faces_04.cc
tests/bits/data_out_rotation_04.cc

index 2dd75f7686e87839af1ae90bc806064b860bc067..418df37f3dc8d4ef8e78ca7c7320034a7a8ded6b 100644 (file)
@@ -1,6 +1,6 @@
 //----------------------------  data_out_04.cc  ---------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
 //    Copyright (C) 2004, 2004, 2007 by the deal.II authors
 //
@@ -38,7 +38,7 @@ class XDataOut : public DataOut<dim>
       { return DataOut<dim>::get_patches(); }
 
     std::vector<std::string>
-    get_dataset_names () const    
+    get_dataset_names () const
       { return DataOut<dim>::get_dataset_names();  }
 
     std::vector<std_cxx1x::tuple<unsigned int, unsigned int, std::string> >
@@ -70,7 +70,7 @@ class XDataOutReader : public DataOutReader<dim>
       { return DataOutReader<dim>::get_patches(); }
 
     std::vector<std::string>
-    get_dataset_names () const    
+    get_dataset_names () const
       { return DataOutReader<dim>::get_dataset_names();  }
 
     std::vector<std_cxx1x::tuple<unsigned int, unsigned int, std::string> >
@@ -92,7 +92,7 @@ check_this (const DoFHandler<dim> &dof_handler,
   data_out.add_data_vector (v_node, "node_data");
   data_out.add_data_vector (v_cell, "cell_data");
   data_out.build_patches ();
-  
+
   {
     std::ofstream tmp ("data_out_04.tmp");
     data_out.write_deal_II_intermediate (tmp);
@@ -102,14 +102,14 @@ check_this (const DoFHandler<dim> &dof_handler,
   {
     std::ifstream tmp ("data_out_04.tmp");
     reader.read (tmp);
-  }  
+  }
 
                                   // finally make sure that we have
                                   // read everything back in
                                   // correctly
   Assert (data_out.get_dataset_names() == reader.get_dataset_names(),
          ExcInternalError());
-  
+
   Assert (data_out.get_patches().size() == reader.get_patches().size(),
          ExcInternalError());
 
@@ -124,29 +124,29 @@ check_this (const DoFHandler<dim> &dof_handler,
          ExcInternalError());
   for (unsigned int i=0; i<data_out.get_vector_data_ranges().size(); ++i)
     {
-      deallog << data_out.get_vector_data_ranges()[i].template get<0>()
+      deallog << std::get<0>(data_out.get_vector_data_ranges()[i])
              << ' '
-             << data_out.get_vector_data_ranges()[i].template get<1>()
+             << std::get<1>(data_out.get_vector_data_ranges()[i])
              << ' '
-             << data_out.get_vector_data_ranges()[i].template get<2>()
+             << std::get<2>(data_out.get_vector_data_ranges()[i])
              << std::endl;
-      Assert (data_out.get_vector_data_ranges()[i].template get<0>()
+      Assert (std::get<0>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<0>(),
+             std::get<0>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
-      Assert (data_out.get_vector_data_ranges()[i].template get<1>()
+      Assert (std::get<1>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<1>(),
+             std::get<1>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
-      Assert (data_out.get_vector_data_ranges()[i].template get<2>()
+      Assert (std::get<2>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<2>(),
+             std::get<2>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
     }
-  
+
                                   // for good measure, delete tmp file
   remove ("data_out_04.tmp");
-  
+
   deallog << "OK" << std::endl;
 }
 
index 34c4037f51896f1a08a2214d925a1f44612e50a6..d67ba6b0c083ee8a513c4483b8e0cbda6a5d23d8 100644 (file)
@@ -1,8 +1,8 @@
 //----------------------------  data_out_faces_04.cc  ---------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2004, 2004, 2006, 2007 by the deal.II authors
+//    Copyright (C) 2004, 2004, 2006, 2007, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -38,7 +38,7 @@ class XDataOut : public DataOutFaces<dim>
       { return DataOutFaces<dim>::get_patches(); }
 
     std::vector<std::string>
-    get_dataset_names () const    
+    get_dataset_names () const
       { return DataOutFaces<dim>::get_dataset_names();  }
 
     std::vector<std_cxx1x::tuple<unsigned int, unsigned int, std::string> >
@@ -59,7 +59,7 @@ class XDataOutReader : public DataOutReader<dim-1,dim>
       { return DataOutReader<dim-1,dim>::get_patches(); }
 
     std::vector<std::string>
-    get_dataset_names () const    
+    get_dataset_names () const
       { return DataOutReader<dim-1,dim>::get_dataset_names();  }
 
     std::vector<std_cxx1x::tuple<unsigned int, unsigned int, std::string> >
@@ -93,7 +93,7 @@ my_check_this (const DoFHandler<dim> &dof_handler,
   data_out.add_data_vector (v_node, "node_data");
   data_out.add_data_vector (v_cell, "cell_data");
   data_out.build_patches ();
-  
+
   {
     std::ofstream tmp ("data_out_faces_04.tmp");
     data_out.write_deal_II_intermediate (tmp);
@@ -103,14 +103,14 @@ my_check_this (const DoFHandler<dim> &dof_handler,
   {
     std::ifstream tmp ("data_out_faces_04.tmp");
     reader.read (tmp);
-  }  
+  }
 
                                   // finally make sure that we have
                                   // read everything back in
                                   // correctly
   Assert (data_out.get_dataset_names() == reader.get_dataset_names(),
          ExcInternalError());
-  
+
   Assert (data_out.get_patches().size() == reader.get_patches().size(),
          ExcInternalError());
 
@@ -125,29 +125,29 @@ my_check_this (const DoFHandler<dim> &dof_handler,
          ExcInternalError());
   for (unsigned int i=0; i<data_out.get_vector_data_ranges().size(); ++i)
     {
-      deallog << data_out.get_vector_data_ranges()[i].template get<0>()
+      deallog << std::get<0>(data_out.get_vector_data_ranges()[i])
              << ' '
-             << data_out.get_vector_data_ranges()[i].template get<1>()
+             << std::get<1>(data_out.get_vector_data_ranges()[i])
              << ' '
-             << data_out.get_vector_data_ranges()[i].template get<2>()
+             << std::get<2>(data_out.get_vector_data_ranges()[i])
              << std::endl;
-      Assert (data_out.get_vector_data_ranges()[i].template get<0>()
+      Assert (std::get<0>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<0>(),
+             std::get<0>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
-      Assert (data_out.get_vector_data_ranges()[i].template get<1>()
+      Assert (std::get<1>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<1>(),
+             std::get<1>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
-      Assert (data_out.get_vector_data_ranges()[i].template get<2>()
+      Assert (std::get<2>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<2>(),
+             std::get<2>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
     }
 
                                   // for good measure, delete tmp file
   remove ("data_out_faces_04.tmp");
-  
+
   deallog << "OK" << std::endl;
 }
 
index 37e11c9e5b0770c3eb49df8c03f87ebf09e816e6..c4ffd32666045511f5df61b9458b6d8dfdcb948e 100644 (file)
@@ -1,8 +1,8 @@
 //----------------------------  data_out_rotation_04.cc  ---------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2004, 2004, 2006, 2007 by the deal.II authors
+//    Copyright (C) 2004, 2004, 2006, 2007, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -38,7 +38,7 @@ class XDataOut : public DataOutRotation<dim>
       { return DataOutRotation<dim>::get_patches(); }
 
     std::vector<std::string>
-    get_dataset_names () const    
+    get_dataset_names () const
       { return DataOutRotation<dim>::get_dataset_names();  }
 
     std::vector<std_cxx1x::tuple<unsigned int, unsigned int, std::string> >
@@ -59,7 +59,7 @@ class XDataOutReader : public DataOutReader<dim+1>
       { return DataOutReader<dim+1>::get_patches(); }
 
     std::vector<std::string>
-    get_dataset_names () const    
+    get_dataset_names () const
       { return DataOutReader<dim+1>::get_dataset_names();  }
 
     std::vector<std_cxx1x::tuple<unsigned int, unsigned int, std::string> >
@@ -91,7 +91,7 @@ my_check_this (const DoFHandler<dim> &dof_handler,
   data_out.add_data_vector (v_node, "node_data");
   data_out.add_data_vector (v_cell, "cell_data");
   data_out.build_patches (4);
-  
+
   {
     std::ofstream tmp ("data_out_rotation_04.tmp");
                                     // use full precision to avoid
@@ -104,14 +104,14 @@ my_check_this (const DoFHandler<dim> &dof_handler,
   {
     std::ifstream tmp ("data_out_rotation_04.tmp");
     reader.read (tmp);
-  }  
+  }
 
                                   // finally make sure that we have
                                   // read everything back in
                                   // correctly
   Assert (data_out.get_dataset_names() == reader.get_dataset_names(),
          ExcInternalError());
-  
+
   Assert (data_out.get_patches().size() == reader.get_patches().size(),
          ExcInternalError());
 
@@ -126,29 +126,29 @@ my_check_this (const DoFHandler<dim> &dof_handler,
          ExcInternalError());
   for (unsigned int i=0; i<data_out.get_vector_data_ranges().size(); ++i)
     {
-      deallog << data_out.get_vector_data_ranges()[i].template get<0>()
+      deallog << std::get<0>(data_out.get_vector_data_ranges()[i])
              << ' '
-             << data_out.get_vector_data_ranges()[i].template get<1>()
+             << std::get<1>(data_out.get_vector_data_ranges()[i])
              << ' '
-             << data_out.get_vector_data_ranges()[i].template get<2>()
+             << std::get<2>(data_out.get_vector_data_ranges()[i])
              << std::endl;
-      Assert (data_out.get_vector_data_ranges()[i].template get<0>()
+      Assert (std::get<0>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<0>(),
+             std::get<0>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
-      Assert (data_out.get_vector_data_ranges()[i].template get<1>()
+      Assert (std::get<1>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<1>(),
+             std::get<1>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
-      Assert (data_out.get_vector_data_ranges()[i].template get<2>()
+      Assert (std::get<2>(data_out.get_vector_data_ranges()[i])
              ==
-             reader.get_vector_data_ranges()[i].template get<2>(),
+             std::get<2>(reader.get_vector_data_ranges()[i]),
              ExcInternalError());
     }
 
                                   // for good measure, delete tmp file
   remove ("data_out_rotation_04.tmp");
-  
+
   deallog << "OK" << std::endl;
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.