// file : build/path-io -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file #ifndef BUILD_PATH_IO #define BUILD_PATH_IO #include #include namespace build { inline std::ostream& operator<< (std::ostream& os, const path& p) { return os << p.string (); } inline std::ostream& operator<< (std::ostream& os, const dir_path& d) { const std::string& s (d.string ()); // Print the directory with trailing '/'. // if (!s.empty ()) os << s << (dir_path::traits::is_separator (s.back ()) ? "" : "/"); return os; } } #endif // BUILD_PATH_IO