From b808c255b6a9ddba085bf5646e7d20ec344f2e2d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Apr 2020 08:48:53 +0200 Subject: Initial support for ad hoc recipes (still work in progress) --- libbuild2/types.ixx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'libbuild2/types.ixx') diff --git a/libbuild2/types.ixx b/libbuild2/types.ixx index c770842..750c8c7 100644 --- a/libbuild2/types.ixx +++ b/libbuild2/types.ixx @@ -3,6 +3,27 @@ namespace build2 { + // location + // + inline ostream& + operator<< (ostream& o, const location& l) + { + if (!l.empty ()) + { + o << l.file; + + if (l.line != 0) + { + o << ':' << l.line; + + if (l.column != 0) + o << ':' << l.column; + } + } + + return o; + } + // Note that in the constructors we cannot pass the file data member to the // base class constructor as it is not initialized yet (and so its base // path/name pointers are not initialized). Thus, we initialize the path -- cgit v1.1