From f11d720f2fb62b46ad17d3aa3850140a4839f114 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 13 Dec 2017 14:20:54 +0200 Subject: Implement info meta operation This meta operation can be used to print basic information (name, version, source/output roots, etc) for one or more projects. --- build2/variable.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'build2/variable.hxx') diff --git a/build2/variable.hxx b/build2/variable.hxx index bba2208..51cc350 100644 --- a/build2/variable.hxx +++ b/build2/variable.hxx @@ -546,6 +546,14 @@ namespace build2 static int simple_compare (const value&, const value&); + // names + // + template <> + struct value_traits + { + static const names& empty_instance; + }; + // bool // template <> @@ -783,6 +791,8 @@ namespace build2 static void prepend (value&, vector&&); static bool empty (const vector& x) {return x.empty ();} + static const vector empty_instance; + // Make sure these are static-initialized together. Failed that VC will // make sure it's done in the wrong order. // @@ -809,6 +819,8 @@ namespace build2 return append (v, move (x));} static bool empty (const map& x) {return x.empty ();} + static const map empty_instance; + // Make sure these are static-initialized together. Failed that VC will // make sure it's done in the wrong order. // -- cgit v1.1