From: bangerth Date: Tue, 6 Apr 2010 21:41:45 +0000 (+0000) Subject: Make compatible with gcc 4.5. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c23c562e2c5ec4cb9611496fa8097ee34d64b283;p=dealii-svn.git Make compatible with gcc 4.5. git-svn-id: https://svn.dealii.org/trunk@20956 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/data_out_04.cc b/tests/bits/data_out_04.cc index 2dd75f7686..418df37f3d 100644 --- a/tests/bits/data_out_04.cc +++ b/tests/bits/data_out_04.cc @@ -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 { return DataOut::get_patches(); } std::vector - get_dataset_names () const + get_dataset_names () const { return DataOut::get_dataset_names(); } std::vector > @@ -70,7 +70,7 @@ class XDataOutReader : public DataOutReader { return DataOutReader::get_patches(); } std::vector - get_dataset_names () const + get_dataset_names () const { return DataOutReader::get_dataset_names(); } std::vector > @@ -92,7 +92,7 @@ check_this (const DoFHandler &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 &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 &dof_handler, ExcInternalError()); for (unsigned int i=0; i() + 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; } diff --git a/tests/bits/data_out_faces_04.cc b/tests/bits/data_out_faces_04.cc index 34c4037f51..d67ba6b0c0 100644 --- a/tests/bits/data_out_faces_04.cc +++ b/tests/bits/data_out_faces_04.cc @@ -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 { return DataOutFaces::get_patches(); } std::vector - get_dataset_names () const + get_dataset_names () const { return DataOutFaces::get_dataset_names(); } std::vector > @@ -59,7 +59,7 @@ class XDataOutReader : public DataOutReader { return DataOutReader::get_patches(); } std::vector - get_dataset_names () const + get_dataset_names () const { return DataOutReader::get_dataset_names(); } std::vector > @@ -93,7 +93,7 @@ my_check_this (const DoFHandler &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 &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 &dof_handler, ExcInternalError()); for (unsigned int i=0; i() + 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; } diff --git a/tests/bits/data_out_rotation_04.cc b/tests/bits/data_out_rotation_04.cc index 37e11c9e5b..c4ffd32666 100644 --- a/tests/bits/data_out_rotation_04.cc +++ b/tests/bits/data_out_rotation_04.cc @@ -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 { return DataOutRotation::get_patches(); } std::vector - get_dataset_names () const + get_dataset_names () const { return DataOutRotation::get_dataset_names(); } std::vector > @@ -59,7 +59,7 @@ class XDataOutReader : public DataOutReader { return DataOutReader::get_patches(); } std::vector - get_dataset_names () const + get_dataset_names () const { return DataOutReader::get_dataset_names(); } std::vector > @@ -91,7 +91,7 @@ my_check_this (const DoFHandler &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 &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 &dof_handler, ExcInternalError()); for (unsigned int i=0; i() + 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; }