diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-08 09:28:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-08 09:28:05 +0200 |
commit | 5c02ef198e539fc4a054ca442a56d89a7b796098 (patch) | |
tree | 1f9f55daca010a2ea9a2b4397d49fe9a449af2bc /bpkg/types.hxx | |
parent | 053cd4e9d35a3b3bda7884cb146236639993af43 (diff) |
Add non-native <name>_0-name mapping, some more tests
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 |