From 54870fb76b5f59cc2e6d69a8c7a8ef17853a0029 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Dec 2016 15:09:04 +0200 Subject: Add comma, ternary, logical operators support in eval context --- build2/variable | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'build2/variable') diff --git a/build2/variable b/build2/variable index b773047..abff1d5 100644 --- a/build2/variable +++ b/build2/variable @@ -248,6 +248,12 @@ namespace build2 reset (); }; + // This is what we call a "value pack"; it can be created by the eval + // context and passed as arguments to functions. Usually we will have just + // one value. + // + using values = small_vector; + // The values should be of the same type (or both be untyped) except NULL // values can also be untyped. NULL values compare equal and a NULL value // is always less than a non-NULL. @@ -439,6 +445,11 @@ namespace build2 // //template T convert (names&&); (declaration causes ambiguity) + // Convert value to T. If value is already of type T, then simply cast it. + // Otherwise call convert(names) above. + // + template T convert (value&&); + // Default implementations of the dtor/copy_ctor/copy_assing callbacks for // types that are stored directly in value::data_ and the provide all the // necessary functions (copy/move ctor and assignment operator). -- cgit v1.1