From d930b5205e277b522c2a7fe4a7c0e08c5a8afee1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Feb 2022 08:59:22 +0200 Subject: Redo diagnostics without operator<< in namespace std --- libbuild2/types.hxx | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'libbuild2/types.hxx') diff --git a/libbuild2/types.hxx b/libbuild2/types.hxx index af1a4de..7bc6b32 100644 --- a/libbuild2/types.hxx +++ b/libbuild2/types.hxx @@ -317,6 +317,14 @@ namespace build2 using paths = std::vector; using dir_paths = std::vector; + // Path printing potentially relative with trailing slash for directories. + // + LIBBUILD2_SYMEXPORT ostream& + operator<< (ostream&, const ::butl::path&); // utility.cxx + + LIBBUILD2_SYMEXPORT ostream& + operator<< (ostream&, const ::butl::path_name_view&); // utility.cxx + // // using butl::system_clock; @@ -381,6 +389,11 @@ namespace build2 process_path_ex () = default; }; + // Print as recall[@effect]. + // + LIBBUILD2_SYMEXPORT ostream& + operator<< (ostream&, const ::butl::process_path&); // utility.cxx + // // using butl::auto_fd; @@ -478,26 +491,6 @@ namespace build2 operator<< (ostream&, run_phase); // utility.cxx } -// In order to be found (via ADL) these have to be either in std:: or in -// butl::. The latter is a bad idea since libbutl includes the default -// implementation. They are defined in utility.cxx. -// -namespace std -{ - // Path printing potentially relative with trailing slash for directories. - // - LIBBUILD2_SYMEXPORT ostream& - operator<< (ostream&, const ::butl::path&); - - LIBBUILD2_SYMEXPORT ostream& - operator<< (ostream&, const ::butl::path_name_view&); - - // Print as recall[@effect]. - // - LIBBUILD2_SYMEXPORT ostream& - operator<< (ostream&, const ::butl::process_path&); -} - // // #include -- cgit v1.1