diff options
Diffstat (limited to 'bpkg/types.hxx')
-rw-r--r-- | bpkg/types.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bpkg/types.hxx b/bpkg/types.hxx index 7a7b2c7..80e5a7d 100644 --- a/bpkg/types.hxx +++ b/bpkg/types.hxx @@ -88,6 +88,8 @@ namespace bpkg // <libbutl/path.hxx> // using butl::path; + using butl::path_name; + using butl::path_name_view; using butl::dir_path; using butl::basic_path; using butl::invalid_path; @@ -233,6 +235,14 @@ namespace std ::butl::path::traits_type::canonicalize (r); return os << r; } + + inline ostream& + operator<< (ostream& os, const ::butl::path_name_view& v) + { + assert (!v.empty ()); + + return v.name != nullptr && *v.name ? (os << **v.name) : (os << *v.path); + } } #endif // BPKG_TYPES_HXX |