diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-26 16:36:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-26 16:36:53 +0200 |
commit | 61617d7bb990f04970c6357d8e9a9095174d8fc4 (patch) | |
tree | c73f266c027d09dd1d0cd4d4233e8fc70ce27447 /build2/variable | |
parent | 4d1c02b736f4c1e827b11085cdc83ce4b46c03d1 (diff) |
Minor module interface cleanups
Diffstat (limited to 'build2/variable')
-rw-r--r-- | build2/variable | 7 |
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. // |