From 61377c582e0f2675baa5f5e6e30a35d1a4164b33 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 1 May 2017 16:08:43 +0300 Subject: Add hxx extension for headers and lib prefix for library dir --- libbutl/path-io.hxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 libbutl/path-io.hxx (limited to 'libbutl/path-io.hxx') diff --git a/libbutl/path-io.hxx b/libbutl/path-io.hxx new file mode 100644 index 0000000..719456d --- /dev/null +++ b/libbutl/path-io.hxx @@ -0,0 +1,29 @@ +// file : libbutl/path-io.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef LIBBUTL_PATH_IO_HXX +#define LIBBUTL_PATH_IO_HXX + +#include + +#include + +namespace butl +{ + // This is the default path IO implementation. The reason it is + // separate is because one often wants a custom implementation. + // 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 + inline std::basic_ostream& + operator<< (std::basic_ostream& os, basic_path const& p) + { + return os << p.string (); + } +} + +#endif // LIBBUTL_PATH_IO_HXX -- cgit v1.1