aboutsummaryrefslogtreecommitdiff
path: root/libbutl/process-io.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-01 16:08:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-01 16:59:24 +0300
commit61377c582e0f2675baa5f5e6e30a35d1a4164b33 (patch)
tree11cdca992834d7f7f197f72856712fbcb3020e3d /libbutl/process-io.hxx
parent442c1a6790e52baa0c081f310d4d9e9b6f1ff638 (diff)
Add hxx extension for headers and lib prefix for library dir
Diffstat (limited to 'libbutl/process-io.hxx')
-rw-r--r--libbutl/process-io.hxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/libbutl/process-io.hxx b/libbutl/process-io.hxx
new file mode 100644
index 0000000..b70080c
--- /dev/null
+++ b/libbutl/process-io.hxx
@@ -0,0 +1,28 @@
+// file : libbutl/process-io.hxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef LIBBUTL_PROCESS_IO_HXX
+#define LIBBUTL_PROCESS_IO_HXX
+
+#include <ostream>
+
+#include <libbutl/process.hxx>
+
+namespace butl
+{
+ inline std::ostream&
+ operator<< (std::ostream& o, const process_path& p)
+ {
+ return o << p.recall_string ();
+ }
+
+ inline std::ostream&
+ operator<< (std::ostream& o, const process_args& a)
+ {
+ process::print (o, a.argv, a.argc);
+ return o;
+ }
+}
+
+#endif // LIBBUTL_PROCESS_IO_HXX