Reflect initialization order in pipestream constructor: The base class is initialized...
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 16 Jul 2010 12:55:20 +0000 (14:55 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 16 Jul 2010 12:55:20 +0000 (14:55 +0200)
src/pipestream.hxx

index 03ee60e..3dad8b6 100644 (file)
@@ -90,7 +90,7 @@ protected:
 
 public:
     inpipestream(const std::string& command)
-            : buf(command), std::istream(&buf)
+            : std::istream(&buf), buf(command)
     {}
 
     void store_exit_status(bool *_status_set, int *_exit_status)
@@ -157,7 +157,7 @@ protected:
     outpipebuf buf;
 public:
     outpipestream(const std::string& command)
-            : buf(command), std::ostream(&buf)
+            : std::ostream(&buf), buf(command)
     {}
 
     void store_exit_status(bool *_status_set, int *_exit_status)