aboutsummaryrefslogtreecommitdiff
path: root/bpkg/types.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/types.hxx')
-rw-r--r--bpkg/types.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/bpkg/types.hxx b/bpkg/types.hxx
index 2b6a1f8..80e5a7d 100644
--- a/bpkg/types.hxx
+++ b/bpkg/types.hxx
@@ -33,6 +33,7 @@
#include <libbutl/optional.hxx>
#include <libbutl/fdstream.hxx>
#include <libbutl/small-vector.hxx>
+#include <libbutl/target-triplet.hxx>
#include <libbutl/default-options.hxx>
namespace bpkg
@@ -87,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;
@@ -127,6 +130,10 @@ namespace bpkg
using butl::ofdstream;
using butl::fdstream_mode;
+ // <libbutl/target-triplet.hxx>
+ //
+ using butl::target_triplet;
+
// <libbutl/default-options.hxx>
//
using butl::default_options_files;
@@ -228,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