diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-20 15:56:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-20 15:56:26 +0200 |
commit | 5058b155076b004f4abf21be6cf657a3f2cc4d1b (patch) | |
tree | 2a1675598de93c22ef9850996cfd2964fb11480c /build2/variable.ixx | |
parent | c9c366bc5f77a806384ebf678fe4335c1422884c (diff) |
Add support for not cleaning generated version file
Diffstat (limited to 'build2/variable.ixx')
-rw-r--r-- | build2/variable.ixx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build2/variable.ixx b/build2/variable.ixx index 8656a04..04cf6dc 100644 --- a/build2/variable.ixx +++ b/build2/variable.ixx @@ -193,6 +193,15 @@ namespace build2 cast_false (const lookup& l) {return l && cast<T> (l);} template <typename T> + inline T + cast_true (const value& v) {return !v || cast<T> (v);} + + template <typename T> + inline T + cast_true (const lookup& l) {return !l || cast<T> (l);} + + + template <typename T> inline void typify (value& v, const variable& var) { |