aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/types.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-02-02 08:59:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-02-02 09:19:19 +0200
commitd930b5205e277b522c2a7fe4a7c0e08c5a8afee1 (patch)
tree76d76d3ab31a1801e7992ba61cce1a0218cc672e /libbuild2/types.hxx
parent793e39564b25acc6283d1fd5a842c9799f1efdbe (diff)
Redo diagnostics without operator<< in namespace std
Diffstat (limited to 'libbuild2/types.hxx')
-rw-r--r--libbuild2/types.hxx33
1 files changed, 13 insertions, 20 deletions
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<path>;
using dir_paths = std::vector<dir_path>;
+ // 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
+
// <libbutl/timestamp.hxx>
//
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
+
// <libbutl/fdstream.hxx>
//
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&);
-}
-
// <libbuild2/name.hxx>
//
#include <libbuild2/name.hxx>