diff options
Diffstat (limited to 'build2/variable')
-rw-r--r-- | build2/variable | 11 |
1 files changed, 11 insertions, 0 deletions
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<value, 1>; + // 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 <typename T> 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 <typename T> 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). |