From e7fa710dd90999702755141c4e704c2d609f9a07 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Mar 2023 09:25:48 +0200 Subject: Disambiguate operator<<(ostream,path_name_view) call This helps, for example, in bpkg where we "see" two version of this operator. --- libbuild2/types.hxx | 6 +++--- libbuild2/types.ixx | 2 +- libbuild2/utility.cxx | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libbuild2/types.hxx b/libbuild2/types.hxx index 20b10de..2dbd3b5 100644 --- a/libbuild2/types.hxx +++ b/libbuild2/types.hxx @@ -351,10 +351,10 @@ namespace build2 // Path printing potentially relative with trailing slash for directories. // LIBBUILD2_SYMEXPORT ostream& - operator<< (ostream&, const ::butl::path&); // utility.cxx + operator<< (ostream&, const path&); // utility.cxx LIBBUILD2_SYMEXPORT ostream& - operator<< (ostream&, const ::butl::path_name_view&); // utility.cxx + operator<< (ostream&, const path_name_view&); // utility.cxx // // @@ -425,7 +425,7 @@ namespace build2 // Print as recall[@effect]. // LIBBUILD2_SYMEXPORT ostream& - operator<< (ostream&, const ::butl::process_path&); // utility.cxx + operator<< (ostream&, const process_path&); // utility.cxx // // diff --git a/libbuild2/types.ixx b/libbuild2/types.ixx index bf44cff..ee2a605 100644 --- a/libbuild2/types.ixx +++ b/libbuild2/types.ixx @@ -10,7 +10,7 @@ namespace build2 { if (!l.empty ()) { - o << l.file; + build2::operator<< (o, l.file); // Disambiguate. if (l.line != 0) { diff --git a/libbuild2/utility.cxx b/libbuild2/utility.cxx index 5a58287..909db07 100644 --- a/libbuild2/utility.cxx +++ b/libbuild2/utility.cxx @@ -42,7 +42,7 @@ namespace build2 } ostream& - operator<< (ostream& os, const ::butl::path& p) + operator<< (ostream& os, const path& p) { using namespace build2; @@ -53,7 +53,7 @@ namespace build2 } ostream& - operator<< (ostream& os, const ::butl::path_name_view& v) + operator<< (ostream& os, const path_name_view& v) { assert (!v.empty ()); @@ -61,7 +61,7 @@ namespace build2 } ostream& - operator<< (ostream& os, const ::butl::process_path& p) + operator<< (ostream& os, const process_path& p) { using namespace build2; -- cgit v1.1