]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
handle both string streams
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 8 Dec 2002 22:35:59 +0000 (22:35 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 8 Dec 2002 22:35:59 +0000 (22:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@6803 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/dof_print_solver_step.h

index 0b33a96792240b9571a09f31f87fe0ec8f0d5131..f9e376b267e3ed0ae748fadede98e7fdcf3f9777 100644 (file)
 #include <lac/vector_memory.h>
 #include <numerics/data_out.h>
 
-#include <strstream>
+#ifdef HAVE_STD_STRINGSTREAM
+#  include <sstream>
+#else
+#  include <strstream>
+#endif
+
 #include <iomanip>
 #include <fstream>
 
@@ -112,10 +117,19 @@ 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
-          << setw(3) << setfill('0') << step
-          << out.default_suffix() << ends;
+          << std::setw(3) << setfill('0') << step
+          << out.default_suffix();
+
+#ifndef HAVE_STD_STRINGSTREAM
+  filename << std::ends;
+#endif
 
   const std::string fname = filename.str();
 

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.