From 557269660c1d9796a7cf9e911efb9262f645e359 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Nov 2016 12:10:03 +0200 Subject: Use diagnostics facility from libbutl --- build2/types | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'build2/types') diff --git a/build2/types b/build2/types index b4488bb..c73da73 100644 --- a/build2/types +++ b/build2/types @@ -112,11 +112,6 @@ namespace build2 using paths = std::vector; using dir_paths = std::vector; - // Path printing with trailing slash for directories (utility.cxx). - // - ostream& - operator<< (ostream&, const path&); - // // using butl::system_clock; @@ -137,14 +132,28 @@ namespace build2 using butl::process_path; using butl::process_error; - ostream& - operator<< (ostream&, const process_path&); // Print as recall[@effect]. - using butl::auto_fd; using butl::ifdstream; using butl::ofdstream; } +// In order to be found (via ADL) these have to be either in std:: or in +// butl::. The latter is bad idea since libbutl includes the default +// implementation. They are defined in utility.cxx. +// +namespace std +{ + // Path printing with trailing slash for directories. + // + ostream& + operator<< (ostream&, const ::butl::path&); + + // Print as recall[@effect]. + // + ostream& + operator<< (ostream&, const ::butl::process_path&); +} + // // #include -- cgit v1.1