From 33e2f00fb710b2f63e9daa690c4eaad1e6eb3bad Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 3 Nov 2016 17:50:32 +0200 Subject: Print empty name as '' rather than {} in quoted mode --- build2/name | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'build2/name') diff --git a/build2/name b/build2/name index 4e514c5..12aa9dc 100644 --- a/build2/name +++ b/build2/name @@ -113,12 +113,14 @@ namespace build2 // // \$(" // + // Note that in the quoted mode empty unqualified name is printed as '', + // not {}. + // ostream& - to_stream (ostream&, const name&, bool quote, char pair); + to_stream (ostream&, const name&, bool quote, char pair = '\0'); inline ostream& - operator<< (ostream& os, const name& n) { - return to_stream (os, n, false, '\0');} + operator<< (ostream& os, const name& n) {return to_stream (os, n, false);} // Vector of names. @@ -129,11 +131,11 @@ namespace build2 // The same semantics as to_stream(name). // ostream& - to_stream (ostream&, const names_view&, bool quote, char pair); + to_stream (ostream&, const names_view&, bool quote, char pair = '\0'); inline ostream& operator<< (ostream& os, const names_view& ns) { - return to_stream (os, ns, false, '\0');} + return to_stream (os, ns, false);} inline ostream& operator<< (ostream& os, const names& ns) {return os << names_view (ns);} -- cgit v1.1