From c09cd7512491cee1e82c1ad8128ce9fd4bc3f79b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 22 Sep 2017 23:32:28 +0200 Subject: Initial modularization with both Clang and VC hacks Note: gave up on VC about half way though. --- libbutl/process-io.mxx | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 libbutl/process-io.mxx (limited to 'libbutl/process-io.mxx') diff --git a/libbutl/process-io.mxx b/libbutl/process-io.mxx new file mode 100644 index 0000000..dfd2221 --- /dev/null +++ b/libbutl/process-io.mxx @@ -0,0 +1,44 @@ +// file : libbutl/process-io.mxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef __cpp_modules +#pragma once +#endif + +// C includes. + +#ifndef __cpp_lib_modules +#include +#endif + +// Other includes. + +#ifdef __cpp_modules +export module butl.process_io; +#ifdef __cpp_lib_modules +import std.core; //@@ MOD TMP (should not be needed). +import std.io; +#endif +import butl.process; +#else +#include +#endif + +#include + +LIBBUTL_MODEXPORT 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; + } +} -- cgit v1.1