From: Wolfgang Bangerth <bangerth@math.tamu.edu>
Date: Fri, 13 Dec 2002 17:38:17 +0000 (+0000)
Subject: In MT mode, we were getting a compiler error when compiling with
X-Git-Tag: v8.0.0~17172
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57dbc35fb46931a88ad08049c83ada056f777896;p=dealii.git

In MT mode, we were getting a compiler error when compiling with
optimization:
=====base=============optimized==MT== parameter_handler.cc
/tmp/ccIx2gJ6.s: Assembler messages:
/tmp/ccIx2gJ6.s:3727: Error: symbol `.LEHB6345' is already defined
/tmp/ccIx2gJ6.s:3738: Error: symbol `.LEHE6345' is already defined
/tmp/ccIx2gJ6.s:3739: Error: symbol `.LEHB6357' is already defined
/tmp/ccIx2gJ6.s:3751: Error: symbol `.LEHE6357' is already defined

This is of course due to some compiler bug, but be that as it is, we
need to work around it. Do that by simply replacing std::list by
std::vector.


git-svn-id: https://svn.dealii.org/trunk@6814 0785d39b-7218-0410-832d-ea1e28bc413d
---

diff --git a/deal.II/base/source/parameter_handler.cc b/deal.II/base/source/parameter_handler.cc
index 6bc062282c..d1213aed52 100644
--- a/deal.II/base/source/parameter_handler.cc
+++ b/deal.II/base/source/parameter_handler.cc
@@ -315,7 +315,8 @@ namespace Patterns
   bool List::match (const std::string &test_string_list) const
   {
     std::string tmp = test_string_list;
-    std::list<std::string> split_list;
+    std::vector<std::string> split_list;
+    split_list.reserve (std::count (tmp.begin(), tmp.end(), ',')+1);
 
 				     // first split the input list
     while (tmp.length() != 0)
@@ -345,7 +346,8 @@ namespace Patterns
       return false;
 
 				     // check the different possibilities
-    for (std::list<std::string>::const_iterator test_string = split_list.begin();
+    for (std::vector<std::string>::const_iterator
+           test_string = split_list.begin();
 	 test_string != split_list.end(); ++test_string) 
       if (pattern->match (*test_string) == false)
         return false;