]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove support for compilers that do not offer the std::[io]stringstream classes.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 3 Feb 2006 19:21:30 +0000 (19:21 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 3 Feb 2006 19:21:30 +0000 (19:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@12233 0785d39b-7218-0410-832d-ea1e28bc413d

33 files changed:
deal.II/base/source/data_out_base.cc
deal.II/base/source/exceptions.cc
deal.II/base/source/log.cc
deal.II/base/source/parameter_handler.cc
deal.II/base/source/table_handler.cc
deal.II/base/source/utilities.cc
deal.II/deal.II/include/numerics/dof_print_solver_step.h
deal.II/deal.II/source/fe/fe_dgp.cc
deal.II/deal.II/source/fe/fe_dgp_monomial.cc
deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc
deal.II/deal.II/source/fe/fe_dgq.cc
deal.II/deal.II/source/fe/fe_nedelec.cc
deal.II/deal.II/source/fe/fe_q.cc
deal.II/deal.II/source/fe/fe_q_hierarchical.cc
deal.II/deal.II/source/fe/fe_raviart_thomas.cc
deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc
deal.II/deal.II/source/fe/fe_system.cc
deal.II/deal.II/source/fe/fe_tools.cc
deal.II/deal.II/source/numerics/data_out.cc
deal.II/deal.II/source/numerics/data_out_stack.cc
deal.II/doc/news/changes.html
deal.II/doc/readme.html
deal.II/examples/step-13/step-13.cc
deal.II/examples/step-14/step-14.cc
deal.II/examples/step-15/step-15.cc
deal.II/examples/step-16/step-16.cc
deal.II/examples/step-17/step-17.cc
deal.II/examples/step-5/step-5.cc
deal.II/lac/include/lac/block_matrix_array.h
deal.II/lac/source/solver_control.cc
tests/deal.II/measure_et_al.cc
tests/fe/mapping.cc
tests/fe/performance.cc

index fb83d0fa558d3290776d15adaa15aabd74c90650..454da55a356e277d45ec97ac6dd0bd5817083316 100644 (file)
 #include <set>
 #include <boost/shared_ptr.hpp>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 //TODO: Is it reasonable to have undocumented exceptions?
 
@@ -3910,17 +3906,8 @@ DataOutReader<dim,spacedim>::read (std::istream &in)
     std::string header;
     getline (in, header);
 
-#ifdef HAVE_STD_STRINGSTREAM
     std::ostringstream s;
-#else
-    std::ostrstream s;
-#endif
-
     s << "[deal.II intermediate format graphics data]";
-
-#ifndef HAVE_STD_STRINGSTREAM
-    s << std::ends;
-#endif
     
     Assert (header == s.str(), ExcUnexpectedInput(s.str(),header));
   }
@@ -3928,17 +3915,8 @@ DataOutReader<dim,spacedim>::read (std::istream &in)
     std::string header;
     getline (in, header);
 
-#ifdef HAVE_STD_STRINGSTREAM
     std::ostringstream s;
-#else
-    std::ostrstream s;
-#endif
-
     s << "[written by " << PACKAGE_STRING << "]";
-
-#ifndef HAVE_STD_STRINGSTREAM
-    s << std::ends;
-#endif
     
     Assert (header == s.str(), ExcUnexpectedInput(s.str(),header));
   }  
@@ -4080,17 +4058,8 @@ operator >> (std::istream                     &in,
       }
     while ((header == "") && in);
 
-#ifdef HAVE_STD_STRINGSTREAM
     std::ostringstream s;
-#else
-    std::ostrstream s;
-#endif
-
     s << "[deal.II intermediate Patch<" << dim << ',' << spacedim << ">]";
-
-#ifndef HAVE_STD_STRINGSTREAM
-    s << std::ends;
-#endif
     
     Assert (header == s.str(), ExcUnexpectedInput(s.str(),header));
   }
index f24bb6aafa5fa695b48d70635e0d00840e667bb4..192c39095325e9b16b99a0ebb5c91b6ada2a9911 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 2000, 2001, 2002, 2003, 2005 by the deal.II authors
+//    Copyright (C) 1998, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <string>
 #include <cstdlib>
 #include <iostream>
-
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 #ifdef HAVE_GLIBC_STACKTRACE
 #  include <execinfo.h>
@@ -211,11 +206,7 @@ const char * ExceptionBase::what () const throw ()
                                        // convert the messages printed by
                                        // the exceptions into a
                                        // std::string
-#ifdef HAVE_STD_STRINGSTREAM
       std::ostringstream converter;
-#else
-      std::ostrstream converter;
-#endif
 
       converter << "--------------------------------------------------------"
                 << std::endl;
@@ -228,9 +219,6 @@ const char * ExceptionBase::what () const throw ()
 
       converter << "--------------------------------------------------------"
                 << std::endl;
-#ifndef HAVE_STD_STRINGSTREAM
-      converter << std::ends;
-#endif
 
       description = converter.str();
 
index 204220f1a0bebe5383ce3c2eff969bc7d4f3bca3..73b1b629f5f3fad7dfac8f290b02e53a4dcf366e 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <iostream>
 #include <iomanip>
 #include <fstream>
-
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 // on SunOS 4.x, getrusage is stated in the man pages and exists, but
@@ -208,16 +203,9 @@ LogStream::print_line_head()
 #ifdef DEALII_MEMORY_DEBUG
   static const pid_t id = getpid();
   
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream statname;
-#else
-  std::ostrstream statname;
-#endif
-  
   statname << "/proc/" << id << "/stat";
-#ifndef HAVE_STD_STRINGSTREAM
-  statname << std::ends;
-#endif
+
   static long size;
   static string dummy;
   ifstream stat(statname.str());
index ccb3a5eeebea4936d34f3adc910307a64efff271..0b0003a7787ef64c531e31007a029731519057c3 100644 (file)
 #include <cstdlib>
 #include <algorithm>
 #include <list>
-
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 #ifdef HAVE_STD_NUMERIC_LIMITS
 # include <limits>
@@ -86,11 +81,7 @@ namespace Patterns
 
   bool Integer::match (const std::string &test_string) const
   {
-#ifdef HAVE_STD_STRINGSTREAM
     std::istringstream str(test_string);
-#else
-    std::istrstream str(test_string.c_str());
-#endif
     
     int i;
     if (str >> i)
@@ -117,18 +108,11 @@ namespace Patterns
                                     // output their values
     if (lower_bound <= upper_bound)
       {
-#ifdef HAVE_STD_STRINGSTREAM
        std::ostringstream description; 
-#else
-       std::ostrstream description;
-#endif
        
        description << "[Integer range "
                    << lower_bound << "..." << upper_bound
                    << " (inclusive)]";
-#ifndef HAVE_STD_STRINGSTREAM
-       description << std::ends;
-#endif
        return description.str();
       }
     else
@@ -172,11 +156,7 @@ namespace Patterns
 
   bool Double::match (const std::string &test_string) const
   {
-#ifdef HAVE_STD_STRINGSTREAM
     std::istringstream str(test_string);
-#else
-    std::istrstream str(test_string.c_str());
-#endif
 
     double d;
     if (str >> d)
@@ -202,18 +182,11 @@ namespace Patterns
                                     // output their values
     if (lower_bound <= upper_bound)
       {
-#ifdef HAVE_STD_STRINGSTREAM
        std::ostringstream description; 
-#else
-       std::ostrstream description;
-#endif
 
        description << "[Floating point range "
                    << lower_bound << "..." << upper_bound
                    << " (inclusive)]";
-#ifndef HAVE_STD_STRINGSTREAM  
-       description << std::ends;
-#endif
        return description.str();
       }
     else
@@ -366,20 +339,12 @@ namespace Patterns
 
   std::string List::description () const
   {
-#ifdef HAVE_STD_STRINGSTREAM
     std::ostringstream description;    
-#else
-    std::ostrstream description;
-#endif
        
     description << "list of <" << pattern->description() << ">" 
                 << " of length " << min_elements << "..." << max_elements
                 << " (inclusive)";
 
-#ifndef HAVE_STD_STRINGSTREAM
-    description << std::ends;
-#endif
-
     return description.str();
   }
 
@@ -837,16 +802,9 @@ void
 ParameterHandler::set (const std::string &entry_string,
                        const double      &new_value)
 {
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream s;
-#else
-  std::ostrstream s;
-#endif
   s << std::setprecision(16);
   s << new_value;
-#ifndef HAVE_STD_STRINGSTREAM
-  s << std::ends;
-#endif
 
                                    // hand this off to the function that
                                    // actually sets the value as a string
@@ -859,15 +817,8 @@ void
 ParameterHandler::set (const std::string &entry_string,
                        const long int    &new_value)
 {
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream s;
-#else
-  std::ostrstream s;
-#endif
   s << new_value;
-#ifndef HAVE_STD_STRINGSTREAM
-  s << std::ends;
-#endif
 
                                    // hand this off to the function that
                                    // actually sets the value as a string
@@ -880,15 +831,8 @@ void
 ParameterHandler::set (const std::string &entry_string,
                        const bool        &new_value)
 {
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream s;
-#else
-  std::ostrstream s;
-#endif
   s << new_value;
-#ifndef HAVE_STD_STRINGSTREAM
-  s << std::ends;
-#endif
 
                                    // hand this off to the function that
                                    // actually sets the value as a string
index 64eb1147db136fc255856595191d0edbda2bf5c6..46610ddd795a7635011bbcc65a088790be8e1d0f 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <base/table_handler.h>
 #include <base/table.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
-
+#include <sstream>
 #include <iostream>
 #include <iomanip>
 #include <strings.h>
@@ -265,11 +260,7 @@ void TableHandler::write_text(std::ostream &out) const
                                         // write it into a dummy
                                         // stream, just to get its
                                         // size upon output
-#ifdef HAVE_STD_STRINGSTREAM
        std::ostringstream dummy_out;
-#else
-       std::ostrstream dummy_out;
-#endif
        
        dummy_out << std::setprecision(column.precision);
 
@@ -278,19 +269,12 @@ void TableHandler::write_text(std::ostream &out) const
        else
          dummy_out.setf (std::ios::fixed, std::ios::floatfield);
        column.entries[i]->write_text (dummy_out);
-#ifndef HAVE_STD_STRINGSTREAM
-       dummy_out << std::ends;
-#endif
        
                                         // get size, note that we are
                                         // not interested in the
                                         // trailing \0
-#ifdef HAVE_STD_STRINGSTREAM
        entry_widths[i][j] = dummy_out.str().length();
-#else
-       entry_widths[i][j] = strlen(dummy_out.str());
-#endif
-      };
+      }
 
                                   // next compute the width each row
                                   // has to have to suit all entries
index c1c499d7f0dbc905f1be106d06f19484c9b06d22..310d5106e4c7610d5175540b1a9f336527eb83af 100644 (file)
@@ -2,7 +2,7 @@
 //      $Id$   
 //    Version: $Name$
 //
-//    Copyright (C) 2005 by the deal.II authors
+//    Copyright (C) 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <cmath>
 #include <unistd.h>
 #include <sys/types.h>
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
+
 #ifdef HAVE_STD_NUMERIC_LIMITS
 #  include <limits>
 #else
@@ -108,11 +105,7 @@ namespace Utilities
   int
   string_to_int (const std::string &s)
   {
-#ifdef HAVE_STD_STRINGSTREAM
     std::istringstream ss(s);
-#else
-    std::ostrstream ss(s.c_str());
-#endif
 
 #ifdef HAVE_STD_NUMERIC_LIMITS
     static const int max_int = std::numeric_limits<int>::max();
@@ -263,11 +256,7 @@ namespace Utilities
     const std::string test_string (name.begin()+position,
                                   name.end());
     
-#ifdef HAVE_STD_STRINGSTREAM
     std::istringstream str(test_string);
-#else
-    std::istrstream str(test_string.c_str());
-#endif
 
     int i;
     if (str >> i)
@@ -380,17 +369,11 @@ namespace Utilities
       std::time_t  time1= std::time (0);
       std::tm     *time = std::localtime(&time1); 
 
-#ifdef HAVE_STD_STRINGSTREAM
       std::ostringstream o;
-#else
-      std::ostrstream o;
-#endif
       o << time->tm_hour << ":"
         << (time->tm_min < 10 ? "0" : "") << time->tm_min << ":"
         << (time->tm_sec < 10 ? "0" : "") << time->tm_sec;
-#ifndef HAVE_STD_STRINGSTREAM
-      o << std::ends;
-#endif
+
       return o.str();
     }
 
index 12877ce0d6be8b1050984b4c6961a9ca4b0f8755..0e08823211208429c65dc1fad82ec5aba01d6b6b 100644 (file)
 #include <lac/vector_memory.h>
 #include <numerics/data_out.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
-
+#include <sstream>
 #include <iomanip>
 #include <fstream>
 
@@ -118,20 +113,11 @@ DoFPrintSolverStep<dim, SOLVER, VECTOR>::print_vectors (const unsigned int step,
   out.add_data_vector(r, "residual");
   out.add_data_vector(d, "update");
 
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream filename;
-#else
-  std::ostrstream filename;
-#endif
-
   filename << basename
           << std::setw(3) << std::setfill('0') << step
           << out.default_suffix();
 
-#ifndef HAVE_STD_STRINGSTREAM
-  filename << std::ends;
-#endif
-
   const std::string fname = filename.str();
 
   deallog << "Writing file:" << fname << std::endl;
index a7c65f372795bcbb2ab2d4cb0d7fb077640bec54..6cc154f601f4a41918a91bcfc9e28f812909b75d 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <fe/fe_dgp.h>
 #include <fe/fe_tools.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 template <int dim>
@@ -55,17 +51,9 @@ FE_DGP<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
-  std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
+  std::ostringstream namebuf;  
   namebuf << "FE_DGP<" << dim << ">(" << this->degree << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index cf784b3421c870a0813337c2e3bb230a74638ede..841f588535cc00c6fad52adc5a3fcce80fd73ea2 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004, 2005 by the deal.II authors
+//    Copyright (C) 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <fe/fe_dgp_monomial.h>
 #include <fe/fe_tools.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 // namespace for some functions that are used in this file.
@@ -158,17 +154,9 @@ FE_DGPMonomial<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
   namebuf << "FE_DGPMonomial<" << dim << ">(" << this->degree << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index 7c6b1fd63d01110775e62e9ae4e27d66c1e8004b..fe355eccc4c01a9a44ac1a4f676286339ff1294f 100644 (file)
 #include <fe/fe_dgp_nonparametric.h>
 #include <fe/fe_values.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 template <int dim>
@@ -89,17 +85,9 @@ FE_DGPNonparametric<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
   namebuf << "FE_DGPNonparametric<" << dim << ">(" << degree << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index c5694e7d7a061b02c7c7002695b1e8c45a0ffc1c..507fd0da0b7cc40bbfe1f8b97e32f4bb60f01ba9 100644 (file)
 
 
 #include <iostream>
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 
@@ -239,17 +235,9 @@ FE_DGQ<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
-  std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
+  std::ostringstream namebuf;  
   namebuf << "FE_DGQ<" << dim << ">(" << this->degree << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index 81915b73fa2d2632048dd4e8964b5258c3888354..82121c041b4a9448454a4fdbab1323cad5d1c1ef 100644 (file)
 #include <fe/fe_nedelec.h>
 #include <fe/fe_values.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 
@@ -75,17 +71,9 @@ FE_Nedelec<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
-  std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
+  std::ostringstream namebuf;  
   namebuf << "FE_Nedelec<" << dim << ">(" << degree << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index 80a56d2a682922968b3ed0f6845c46b3f64e1f12..d21246db900dcd2d7aadc8a4c620be7e0c3321ac 100644 (file)
 
 #include <vector>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 // namespace for some functions that are used in this file. they are
@@ -225,17 +221,9 @@ FE_Q<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
   
-#ifdef HAVE_STD_STRINGSTREAM
-  std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
+  std::ostringstream namebuf;  
   namebuf << "FE_Q<" << dim << ">(" << this->degree << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index 931202cd22884b968fb6e209e4de07c639d3978a..86d0830b1fd5358cae57d73deb89cae6cf65e90b 100644 (file)
 #include <fe/fe_q_hierarchical.h>
 
 #include <cmath>
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 namespace 
@@ -102,17 +98,9 @@ FE_Q_Hierarchical<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
-  std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
+  std::ostringstream namebuf;  
   namebuf << "FE_Q_Hierarchical<" << dim << ">(" << this->degree << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index 4c14f9a7428e97755e070624fc1eeebe15ee07ed..6182a5ea07f2b45cdcc9d69dbc3dd24e04852a21 100644 (file)
 #include <fe/fe_values.h>
 #include <fe/fe_tools.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
-
+#include <sstream>
 #include <iostream>
-using namespace std;
 
 
 template <int dim>
@@ -106,17 +100,9 @@ FE_RaviartThomas<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
-  std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
+  std::ostringstream namebuf;  
   namebuf << "FE_RaviartThomas<" << dim << ">(" << rt_order << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index f01a405cbd715b0f122664726e3cedbd4ad8cf80..acf927e5d713045cbe434ffecff6965b9d784c10 100644 (file)
 #include <fe/fe_values.h>
 #include <fe/fe_tools.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 template <int dim>
 FE_RaviartThomasNodal<dim>::FE_RaviartThomasNodal (const unsigned int deg)
@@ -103,17 +99,9 @@ FE_RaviartThomasNodal<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
-  std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
-  
+  std::ostringstream namebuf;  
   namebuf << "FE_RaviartThomasNodal<" << dim << ">(" << this->degree-1 << ")";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index 8e7b4aadbe3a54814eb505b6bb94ccba724b40f4..639d82eda9dae064bb53384742c6d399719bc6b5 100644 (file)
 #include <fe/mapping.h>
 #include <fe/fe_system.h>
 #include <fe/fe_values.h>
+
 #include <iostream>
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 /* ----------------------- FESystem::InternalData ------------------- */
@@ -238,11 +235,7 @@ FESystem<dim>::get_name () const
                                   // this function returns, so they
                                   // have to be kept in synch
 
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream namebuf;
-#else
-  std::ostrstream namebuf;
-#endif
 
   namebuf << "FESystem<" << dim << ">[";
   for (unsigned int i=0; i<n_base_elements(); ++i)
@@ -255,9 +248,6 @@ FESystem<dim>::get_name () const
     }
   namebuf << ']';
 
-#ifndef HAVE_STD_STRINGSTREAM
-  namebuf << std::ends;
-#endif
   return namebuf.str();
 }
 
index b1163d1314643835f71e3d5106019a0a2b823d31..0a27aa256de23539fd65fca11296d848ebb52abb 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 
 #include <boost/shared_ptr.hpp>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
-
 
 
 namespace 
index 2c8144c92b7f579196d266001d544a67b30ef36a..c569e92ee1e76755031d3bfcfa3acfcf15f8ae57 100644 (file)
 #include <fe/mapping_q1.h>
 #include <fe/select_fe_values.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 
@@ -271,18 +267,11 @@ add_data_vector (const VECTOR         &vec,
       names.resize (n_components);
       for (unsigned int i=0; i<n_components; ++i)
        {
-#ifdef HAVE_STD_STRINGSTREAM
          std::ostringstream namebuf;
-#else
-         std::ostrstream namebuf;
-#endif
          namebuf << '_' << i;
-#ifndef HAVE_STD_STRINGSTREAM
-         namebuf << std::ends;
-#endif
          names[i] = name + namebuf.str();
-       };
-    };
+       }
+    }
   
   add_data_vector (vec, names, type);
 }
index 780bc0b46e5be91e1001a10d069cbfdf0b595d8b..89760b939ae0829bd74dab348a6cf2ed6278989b 100644 (file)
 #include <fe/select_fe_values.h>
 #include <fe/mapping_q1.h>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
+
 
 template <int dim, template <int> class DH>
 unsigned int
@@ -151,15 +148,8 @@ void DataOutStack<dim,DH>::add_data_vector (const Vector<number> &vec,
       names.resize (n_components);
       for (unsigned int i=0; i<n_components; ++i)
        {
-#ifdef HAVE_STD_STRINGSTREAM
          std::ostringstream namebuf;
-#else
-         std::ostrstream namebuf;
-#endif
          namebuf << '_' << i;
-#ifndef HAVE_STD_STRINGSTREAM
-         namebuf << std::ends;
-#endif
          names[i] = name + namebuf.str();
        }
     }
index f94d107c5ba2de77dc9e1335c20382635beafcfb..48f7e7c8f22fc3180bb7ee4f3fb139ca523221b3 100644 (file)
@@ -44,6 +44,14 @@ inconvenience this causes.
 
 
 <ol>
+  <li> <p>
+       Removed: Support for gcc2.95 in particular, and all compilers that do
+       not support the <code>std::ostringstream</code> class in general,
+       has been removed.
+       <br> 
+       (WB 2006/02/03)
+       </p>
+
   <li> <p>
        Changed: Several classes related to the storage of data in the
        Triangulation and DoFHandler classes have been moved into internal
index ed86dc49e151fe8b7013bc3f288f589b350a35a3..3c6a37464a6d5c7d9451995607ff5d56c1e5c13d 100644 (file)
     developed and tested on Unix or Unix-like systems only. It can be
     used positively on
     <ul>
-      <li>Linux on x86, with gcc 2.95, 3.0, 3.1/3.2, 3.3, 3.4, and 4.0; and
+      <li>Linux on x86, with gcc 3.0, 3.1/3.2, 3.3, 3.4, and 4.0; and
           Intel ICC 6.0, 7.0, 7.1, 8.0, and 8.1;
       <li>Linux on x86_64 (Opterons, AMD64, and Intel EM64T chips) using gcc
           3.3, 3.4, and 4.0;
-      <li>Sun Solaris 2.5, 2.6, 7, 8, and 9 on Sparc, with gcc 2.95,
+      <li>Sun Solaris 2.5, 2.6, 7, 8, and 9 on Sparc, with
           gcc 3.0, and gcc 3.1/3.2; 
       <li>Sun Solaris 9 on Sparc in 64bit mode, with gcc 3.1.1/3.2;
-      <li>Sun Solaris 8 on x86, with gcc 2.95;
-      <li>FreeBSD 4.5 on x86, with gcc 2.95;
+      <li>FreeBSD 4.5 on x86, with gcc newer than 2.95;
       <li>IBM AIX 5.1 on Power4, with gcc 3.2 and gcc 3.3;
-      <li>IBM AIX 4.2, with gcc 2.95 (with some restrictions on
+      <li>IBM AIX 4.2, with gcc newer than 2.95 (with some restrictions on
           the use of shared libraries);
       <li>SGI IRIX64, with MIPSpro 7.41;
       <li>Linux on IA-64 (Itanium), using gcc 3.4.2 and ICC 8.1;
-      <li>Linux on HP/Compaq Alpha with gcc 2.95 (courtesy of 
+      <li>Linux on HP/Compaq Alpha with gcc newer than 2.95 (courtesy of 
           <a href="http://testdrive.hp.com">testdrive.hp.com</a>);
       <li>Linux on HPPA PA-RISC with gcc 3.0 (with some restrictions on
           the use of shared libraries; courtesy of 
     our experiences on separate pages:
     <ul>
       <li> <a href="platforms/sgi-irix.html" target="body">SGI
-           IRIX64</a> with gcc 2.95.x, 3.2, 3.3 and 3.4, and with MIPSpro 7.41;
+           IRIX64</a> with gcc 3.2, 3.3 and 3.4, and with MIPSpro 7.41;
 
       <li> <a href="platforms/dec-osf5.html" target="body">OSF1 V5.3 on
-           Alpha</a> with gcc 2.95.x (the same notes probably also apply
-           to Linux on DEC Alpha) and using DEC's cxx compiler version
+           Alpha</a> with gcc newer than 2.95.x (the same notes probably also
+          apply to Linux on DEC Alpha) and using DEC's cxx compiler version
            6.3; for older systems with OSF1 4.0 and cxx6.0 please see
           <a href="platforms/dec-osf.html" target="body">this page</a>.
 
     <ul>
       <li> <p>
            A fairly complete C++ compiler. We usually use 
-           <a href="http://gcc.gnu.org" target="_top">gcc2.95 or
-           gcc3.x</a> but also some others. Various working compilers
+           <a href="http://gcc.gnu.org" target="_top">gcc3.x</a> but also some
+          others. Various working compilers 
            are listed above. egcs1.x and older gcc versions will not
            work, however. For gcc 2.96, see the <a href="faq.html#gcc296"
            target="body">Frequently Asked Questions</a>. Also, Sun 
index 365415c99ae21a6fcb911613c30c2cab1dabd979..dbcc787db6287ba6ec811256506ab0b10385ed2c 100644 (file)
@@ -4,7 +4,7 @@
 /*    $Id$       */
 /*    Version: $Name$                                          */
 /*                                                                */
-/*    Copyright (C) 2001, 2002, 2003, 2004 by the deal.II authors */
+/*    Copyright (C) 2001, 2002, 2003, 2004, 2006 by the deal.II authors */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyright and license information. Please refer     */
 #include <iostream>
 #include <fstream>
 #include <list>
-
-                                // Just as in the step-5 example
-                                // program (see there for a lengthy
-                                // discussion of the subject), we
-                                // have to work around some
-                                // historical confusion with the
-                                // files declaring the stringstream
-                                // classes:
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
                                 // @sect3{Evaluation of the solution}
@@ -663,13 +651,6 @@ namespace Evaluation
                                   // value of the format descriptor
                                   // passed as second argument.
                                   //
-                                  // The somewhat complicated use of
-                                  // the stringstream class,
-                                  // involving support from the
-                                  // preprocessor, is as already
-                                  // explained in the step-5 example
-                                  // program.
-                                  //
                                   // Also note that we have to prefix
                                   // ``this->'' to access a member
                                   // variable of the template
@@ -689,20 +670,12 @@ namespace Evaluation
     data_out.add_data_vector (solution, "solution");
     data_out.build_patches ();
   
-#ifdef HAVE_STD_STRINGSTREAM
     std::ostringstream filename;
-#else
-    std::ostrstream filename;
-#endif
     filename << output_name_base << "-"
             << this->refinement_cycle
             << data_out.default_suffix (output_format)
             << std::ends;
-#ifdef HAVE_STD_STRINGSTREAM
     std::ofstream out (filename.str().c_str());
-#else
-    std::ofstream out (filename.str());
-#endif
     
     data_out.write (out, output_format);
   }
index 7acff59ef1143f7ed87aae06f88f9d2ec962209d..fd6f0ef6f0f4c3f06762fb37f3500f5645b9e9fa 100644 (file)
@@ -4,7 +4,7 @@
 /*    $Id$       */
 /*    Version: $Name$                                          */
 /*                                                                */
-/*    Copyright (C) 2002, 2003, 2004, 2005 by the deal.II authors */
+/*    Copyright (C) 2002, 2003, 2004, 2005, 2006 by the deal.II authors */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyright and license information. Please refer     */
 #include <list>
 #include <algorithm>
 #include <numeric>
-
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
                                 // @sect3{Evaluating the solution}
 
@@ -423,21 +418,13 @@ namespace Evaluation
   GridOutput<dim>::operator () (const DoFHandler<dim> &dof_handler,
                                const Vector<double>  &/*solution*/) const
   {
-#ifdef HAVE_STD_STRINGSTREAM
     std::ostringstream filename;
-#else
-    std::ostrstream filename;
-#endif
     filename << output_name_base << "-"
             << this->refinement_cycle
             << ".eps"
             << std::ends;
-#ifdef HAVE_STD_STRINGSTREAM
-    std::ofstream out (filename.str().c_str());
-#else
-    std::ofstream out (filename.str());
-#endif
     
+    std::ofstream out (filename.str().c_str());
     GridOut().write_eps (dof_handler.get_tria(), out);
   }
 }
@@ -927,21 +914,13 @@ namespace LaplaceSolver
     data_out.add_data_vector (this->solution, "solution");
     data_out.build_patches ();
 
-#ifdef HAVE_STD_STRINGSTREAM
     std::ostringstream filename;
-#else
-    std::ostrstream filename;
-#endif
     filename << "solution-"
             << this->refinement_cycle
             << ".gnuplot"
             << std::ends;
-#ifdef HAVE_STD_STRINGSTREAM
-    std::ofstream out (filename.str().c_str());
-#else
-    std::ofstream out (filename.str());
-#endif
     
+    std::ofstream out (filename.str().c_str());
     data_out.write (out, DataOut<dim>::gnuplot);
   }
   
@@ -2846,21 +2825,13 @@ namespace LaplaceSolver
     
     data_out.build_patches ();
   
-#ifdef HAVE_STD_STRINGSTREAM
     std::ostringstream filename;
-#else
-    std::ostrstream filename;
-#endif
     filename << "solution-"
             << this->refinement_cycle
             << ".gnuplot"
             << std::ends;
-#ifdef HAVE_STD_STRINGSTREAM
-    std::ofstream out (filename.str().c_str());
-#else
-    std::ofstream out (filename.str());
-#endif
     
+    std::ofstream out (filename.str().c_str());    
     data_out.write (out, DataOut<dim>::gnuplot);
   }
 
index 31b4c040820db88b4487b25d5d42b9a406a18be7..0b76b8f7451a04f0b54fd4559e64c21951082b22 100644 (file)
@@ -4,7 +4,7 @@
 /*    $Id$       */
 /*    Version: $Name$                                          */
 /*                                                                */
-/*    Copyright (C) 2002, 2003, 2004 by the deal.II authors                   */
+/*    Copyright (C) 2002, 2003, 2004, 2006 by the deal.II authors                   */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyright and license information. Please refer     */
                                  // header files:
 #include <fstream>
 #include <iostream>
-
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
                                  // The first thing we have here is a helper
@@ -833,21 +828,13 @@ MinimizationProblem<dim>::output_results () const
   data_out.add_data_vector (present_solution, "solution");
   data_out.build_patches ();
 
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream filename;
-#else
-  std::ostrstream filename;
-#endif
   filename << "solution-"
            << run_number
            << ".gnuplot"
            << std::ends;
-#ifdef HAVE_STD_STRINGSTREAM
-  std::ofstream out (filename.str().c_str());
-#else
-  std::ofstream out (filename.str());
-#endif
 
+  std::ofstream out (filename.str().c_str());
   data_out.write_gnuplot (out);
 }
 
index dde5cf2cea2e4343fc52f69b4b04db54a8900305..3c8cf5cedc1d7e39582662f2a4b32b68ed4dbb1f 100644 (file)
@@ -4,7 +4,7 @@
 /*    $Id$       */
 /*    Version: $Name$                                          */
 /*                                                                */
-/*    Copyright (C) 2003, 2004, 2005 by the deal.II authors */
+/*    Copyright (C) 2003, 2004, 2005, 2006 by the deal.II authors */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyright and license information. Please refer     */
 #include <multigrid/mg_smoother.h>
 #include <multigrid/mg_matrix.h>
 
-                                // This is C++ ... see step 5 for
-                                // further comments.
+                                // This is C++:
 #include <fstream>
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
                                 // This class is based on the same
@@ -495,29 +490,13 @@ void LaplaceProblem<dim>::output_results (const unsigned int cycle) const
 
                                   // The following block generates
                                   // the file name and opens the
-                                  // file. This looks awkward because
-                                  // of a change in the handling of
-                                  // string streams (See step 5 for explanation).
-  
-#ifdef HAVE_STD_STRINGSTREAM
+                                  // file:
   std::ostringstream filename;
-#else
-  std::ostrstream filename;
-#endif
   filename << "solution-"
           << cycle
           << ".gnuplot";
 
-#ifndef HAVE_STD_STRINGSTREAM
-  filename << std::ends;
-#endif
-
-#ifdef HAVE_STD_STRINGSTREAM
   std::ofstream output (filename.str().c_str());
-#else
-  std::ofstream output (filename.str());
-#endif
-
   data_out.write_gnuplot (output);
 }
 
index 6784b59e9da67ef6506226c7e41d24a6e52f99e8..aa78eb78fdec6fc78a7398e559a8f65c8c67cded 100644 (file)
@@ -4,7 +4,7 @@
 /*    $Id$       */
 /*    Version: $Name$                                          */
 /*                                                                */
-/*    Copyright (C) 2000, 2004, 2005 by the deal.II authors */
+/*    Copyright (C) 2000, 2004, 2005, 2006 by the deal.II authors */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyright and license information. Please refer     */
                                  // And this is simply C++ again:
 #include <fstream>
 #include <iostream>
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
                                  // Now, here comes the declaration of the
@@ -939,7 +935,7 @@ void ElasticProblem<dim>::output_results (const unsigned int cycle) const
                                    // with setting up the output file as in
                                    // step-8, and attaching the (localized)
                                    // solution vector to the output
-                                   // object. (The code to generate the output
+                                   // object:. (The code to generate the output
                                    // file name is stolen and slightly
                                    // modified from step-5, since we expect
                                    // that we can do a number of cycles
@@ -947,15 +943,10 @@ void ElasticProblem<dim>::output_results (const unsigned int cycle) const
                                    // what the code in step-8 could handle.)
   if (this_mpi_process == 0)
     {
-#ifdef HAVE_STD_STRINGSTREAM
       std::ostringstream filename;
       filename << "solution-" << cycle << ".gmv";
+
       std::ofstream output (filename.str().c_str());
-#else
-      std::ostrstream filename;
-      filename << "solution-" << cycle << ".gmv";
-      std::ofstream output (filename.str());
-#endif
 
       DataOut<dim> data_out;
       data_out.attach_dof_handler (dof_handler);
index 8b0497a0fe8c643487d40c03b8c486e53f776835..dc122bd69b0272bbf9aeeb0fe8938287938dd556 100644 (file)
@@ -4,7 +4,7 @@
 /*    $Id$       */
 /*    Version: $Name$                                          */
 /*                                                                */
-/*    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors */
+/*    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006 by the deal.II authors */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyright and license information. Please refer     */
                                 // ... and this is too: We will
                                 // convert integers to strings using
                                 // the C++ stringstream class
-                                // ``ostringstream''. One annoying
-                                // complication arises here in that
-                                // the classes ``std::istringstream''
-                                // and ``std::ostringstream'' (with
-                                // these names) have not been part of
-                                // standard libraries of C++
-                                // compilers for long. They have only
-                                // been part of C++ compilers since
-                                // around the time the C++ standard
-                                // was made in 1999. For example, the
-                                // gcc compiler up to and including
-                                // version 2.95.2 did not have them,
-                                // but instead provided classes
-                                // ``istrstream'' and ``ostrstream''
-                                // with a similar, but nevertheless
-                                // slightly different
-                                // interface. Furthermore, they were
-                                // declared in the include file
-                                // ``<strstream>'', while the new
-                                // standards conforming classes are
-                                // declared in ``<sstream>''. Many
-                                // other compilers followed the gcc
-                                // scheme, so whenever we want to
-                                // support versions of compilers that
-                                // appeared before approximately
-                                // 2000/2001, we have to support
-                                // these old classes.
-                                //
-                                // Since we do want to support these
-                                // compilers, the ``./configure''
-                                // script you run as the very first
-                                // step of installing the library
-                                // determines whether the compiler
-                                // you want to use supports the new
-                                // classes, or whether we have to
-                                // fall back on the old ones. If the
-                                // new classes are supported, then
-                                // the preprocessor variable
-                                // ``HAVE_STD_STRINGSTREAM'' is set
-                                // in the ``base/config.h'' include
-                                // file, that all include files in
-                                // the library also include. Since we
-                                // have included quite a number of
-                                // files from the library at this
-                                // point, the definition or
-                                // non-definition of this
-                                // preprocessor variable can now be
-                                // used to decide whether old or new
-                                // header names have to be used to
-                                // import string stream classes:
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+                                // ``ostringstream'':
+#include <sstream>
 
 
                                  // @sect3{The ``LaplaceProblem'' class template}
@@ -807,36 +754,10 @@ void LaplaceProblem<dim>::output_results (const unsigned int cycle) const
                                   // strings, and one could as well
                                   // use stream modifiers such as
                                   // ``setw'', ``setprecision'', and
-                                  // so on.
-                                  //
-                                  // In C++, you can do this by using
-                                  // the so-called stringstream
-                                  // classes. As already discussed at
-                                  // the point of inclusion of the
-                                  // respective header file above,
-                                  // there is some historical
-                                  // confusion we have to work around
-                                  // here, since the class we'd like
-                                  // to use used to be called
-                                  // ``ostrstream'', but now is named
-                                  // ``ostringstream''. In the same
-                                  // way as done above in deciding
-                                  // which file to include, we here
-                                  // decide which class name to use:
-#ifdef HAVE_STD_STRINGSTREAM
+                                  // so on. In C++, you can do this
+                                  // by using the so-called stringstream
+                                  // classes:
   std::ostringstream filename;
-#else
-  std::ostrstream filename;
-#endif
-                                  // Fortunately, the interface of
-                                  // the two classes which we might
-                                  // now be using, depending on which
-                                  // one is available, is close
-                                  // enough that we need to take care
-                                  // about the differences only once
-                                  // below, so we can use them in a
-                                  // rather straightforward way, even
-                                  // if they are not identical.
 
                                   // In order to now actually
                                   // generate a filename, we fill the
@@ -847,33 +768,15 @@ void LaplaceProblem<dim>::output_results (const unsigned int cycle) const
   filename << "solution-"
           << cycle
           << ".eps";
-  
-                                  // For the old string stream
-                                  // classes, we have to append the
-                                  // final '\0' that appears at the
-                                  // end of ``char *''
-                                  // variables. This is done by the
-                                  // following construct:
-#ifndef HAVE_STD_STRINGSTREAM
-  filename << std::ends;
-#endif
-                                  // We can get whatever we wrote to
-                                  // the stream using the ``str()''
-                                  // function. If the new
-                                  // stringstream classes are used,
-                                  // then the result is a string
-                                  // which we have to convert to a
-                                  // char* using the ``c_str()''
-                                  // function, otherwise the result
-                                  // is a char* right away. Use that
-                                  // as filename for the output
-                                  // stream and then write the data
-                                  // to the file:
-#ifdef HAVE_STD_STRINGSTREAM
+
+                                   // We can get whatever we wrote to the
+                                  // stream using the ``str()'' function. The
+                                  // result is a string which we have to
+                                  // convert to a char* using the ``c_str()''
+                                  // function. Use that as filename for the
+                                  // output stream and then write the data to
+                                  // the file:
   std::ofstream output (filename.str().c_str());
-#else
-  std::ofstream output (filename.str());
-#endif
 
   data_out.write_eps (output);
 }
index 87320b854b9342731494a6d6dbce6330c5510b3b..408eb8b520abb9fc08391731db8e35831a6f9940 100644 (file)
 #include <map>
 #include <string>
 #include <memory>
-
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 
 template <typename> class BlockVector;
@@ -737,25 +732,14 @@ BlockMatrixArray<number>::print_latex (STREAM& out) const
            matrix_names.insert(
              std::pair<const PointerMatrixBase<Vector<number> >*, std::string> (m->matrix,
                                                      std::string("M")));
-#ifdef HAVE_STD_STRINGSTREAM
           std::ostringstream stream;
-#else
-          std::ostrstream stream;
-#endif
-         
          stream << matrix_number++;
-         
-#ifndef HAVE_STD_STRINGSTREAM
-          stream << std::ends;
-#endif
-         x.first->second += stream.str();
+
+          x.first->second += stream.str();
        }
       
-#ifdef HAVE_STD_STRINGSTREAM
       std::ostringstream stream;
-#else
-      std::ostrstream stream;
-#endif
+
       if (array(m->row, m->col) != "" && m->prefix >= 0)
        stream << "+";
       if (m->prefix != 1.)
@@ -765,9 +749,6 @@ BlockMatrixArray<number>::print_latex (STREAM& out) const
       if (m->transpose)
        stream << "^T";
 
-#ifndef HAVE_STD_STRINGSTREAM
-      stream << std::ends;
-#endif
       array(m->row, m->col) += stream.str();
     }
   for (unsigned int i=0;i<n_block_rows();++i)
index eca6bf3ba9d2ff5fa8b714662c23d8f7635235e1..97e15e88168f964c516bc1f43e4671a5fa9b0f96 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <lac/solver_control.h>
 
 #include <cmath>
-
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
+#include <sstream>
 
 /*----------------------- SolverControl ---------------------------------*/
 
@@ -52,17 +47,9 @@ SolverControl::NoConvergence::what () const throw ()
   static std::string description;
                                   // convert the messages printed by the
                                   // exceptions into a std::string
-#ifdef HAVE_STD_STRINGSTREAM
   std::ostringstream out;
-#else
-  std::ostrstream out;
-#endif
-
   out << "Iterative method reported convergence failure in step "
       << last_step << " with residual " << last_residual;
-#ifndef HAVE_STD_STRINGSTREAM
-  out << std::ends;
-#endif
 
   description = out.str();
   return description.c_str();
index e1bae432f067a6b373f0110bbe222a968c550733..03b9c9bcb5e2675279b7104798d769ac9e0659e3 100644 (file)
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (C) 2005 by the deal.II authors
+// Copyright (C) 2005, 2006 by the deal.II authors
 //
 // Computes measure, center and barycenter on a variety of cells
 
 #include <grid/grid_generator.h>
 #include <fstream>
 
-
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#  define SSTREAM std::ostringstream
-#  define ENDSTRING
-#else
-#  include <strstream>
-#  define SSTREAM std::ostrstream
-#  define ENDSTRING << std::ends
-#endif
-
 #define PRECISION 5
 
 char fname[50];
index d6b4e5cccb022b72a63ea4812c95841e6d505e1d..27f6e73c736d358e730b6ca26f4b3e20b0501382 100644 (file)
@@ -1,5 +1,5 @@
 // mapping.cc,v 1.19 2004/01/30 09:56:19 hartmann Exp
-// Copyright (C) 2001, 2002, 2003, 2004, 2005 Ralf Hartmann
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Ralf Hartmann
 //
 // Shows the shape functions implemented and computes the area of cells.
 
 #include <fstream>
 #include <string>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#  define SSTREAM std::ostringstream
-#  define ENDSTRING
-#else
-#  include <strstream>
-#  define SSTREAM std::ostrstream
-#  define ENDSTRING << std::ends
-#endif
+#include <sstream>
 
 #define PRECISION 2
 
@@ -489,9 +481,9 @@ void mapping_test()
          {
            if (true)
              {
-               SSTREAM ost;
+               std::ostringstream ost;
                ost << "Mapping" << dim << "d-" << i << '-'
-                   << mapping_strings[j] ENDSTRING;
+                   << mapping_strings[j];
                deallog << ost.str() << std::endl;
                plot_transformation(*mapping_ptr[j], fe_q4, cell, ost.str());
                compute_area(*mapping_ptr[j], fe_q4, cell);
@@ -499,18 +491,18 @@ void mapping_test()
            
            if (dim>1)
              {
-               SSTREAM ost;
+               std::ostringstream ost;
                ost << "MappingFace" << dim << "d-" << i << '-'
-                   << mapping_strings[j] ENDSTRING;
+                   << mapping_strings[j];
                deallog << ost.str() << std::endl;          
                plot_faces(*mapping_ptr[j], fe_q4, cell, ost.str());
              }
 
            if (dim>1)
              {
-               SSTREAM ost;
+               std::ostringstream ost;
                ost << "MappingSubface" << dim << "d-" << i << '-'
-                   << mapping_strings[j] ENDSTRING;
+                   << mapping_strings[j];
                deallog << ost.str() << std::endl;          
                plot_subfaces(*mapping_ptr[j], fe_q4, cell, ost.str());
              }
index c8c5308e8601aaa723158d20e913a4dca50a0575..e51e79440c0bb84e0fb48ea64d8f4e2af34b0b01 100644 (file)
 #include <fstream>
 #include <string>
 
-#ifdef HAVE_STD_STRINGSTREAM
-#  include <sstream>
-#else
-#  include <strstream>
-#endif
 
 template <int dim>
 void performance (Triangulation<dim>& tr,

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.