diff options
Diffstat (limited to 'libbutl/path-io.mxx')
-rw-r--r-- | libbutl/path-io.mxx | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/libbutl/path-io.mxx b/libbutl/path-io.mxx deleted file mode 100644 index 6b6dbcf..0000000 --- a/libbutl/path-io.mxx +++ /dev/null @@ -1,54 +0,0 @@ -// file : libbutl/path-io.mxx -*- C++ -*- -// license : MIT; see accompanying LICENSE file - -#ifndef __cpp_modules_ts -#pragma once -#endif - -// C includes. - -#include <cassert> - -#ifndef __cpp_lib_modules_ts -#include <ostream> -#endif - -// Other includes. - -#ifdef __cpp_modules_ts -export module butl.path_io; -#ifdef __cpp_lib_modules_ts -import std.core; //@@ MOD TMP (should not be needed). -import std.io; -#endif -import butl.path; -#else -#include <libbutl/path.mxx> -#endif - -#include <libbutl/export.hxx> - -LIBBUTL_MODEXPORT namespace butl -{ - // This is the default path IO implementation. It is separate to allow - // custom implementations. For example, we may want to print paths as - // relative to the working directory. Or we may want to print '~' for the - // home directory prefix. Or we may want to print dir_path with a trailing - // '/'. - // - template <typename C, typename K> - inline std::basic_ostream<C>& - operator<< (std::basic_ostream<C>& os, const basic_path<C, K>& p) - { - return to_stream (os, p, false /* representation */); - } - - template <typename C, typename P> - inline std::basic_ostream<C>& - operator<< (std::basic_ostream<C>& os, const basic_path_name_view<P>& v) - { - assert (!v.null ()); - - return v.name != nullptr && *v.name ? (os << **v.name) : (os << *v.path); - } -} |