aboutsummaryrefslogtreecommitdiff
path: root/build2/variable
diff options
context:
space:
mode:
Diffstat (limited to 'build2/variable')
-rw-r--r--build2/variable7
1 files changed, 7 insertions, 0 deletions
diff --git a/build2/variable b/build2/variable
index a5f2ea5..c506a3e 100644
--- a/build2/variable
+++ b/build2/variable
@@ -252,6 +252,13 @@ namespace build2
template <typename T> const T* cast_null (const value&);
template <typename T> const T* cast_null (const lookup&);
+ // As above but returns false if the value is NULL (or not defined, in case
+ // of lookup). Note that the template argument is only for documentation and
+ // should be bool (or semantically compatible).
+ //
+ template <typename T> T cast_false (const value& v);
+ template <typename T> T cast_false (const lookup& l);
+
// Assign value type to the value. In the second version the variable is
// optional and is only used for diagnostics.
//