aboutsummaryrefslogtreecommitdiff
path: root/build2/variable.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/variable.hxx')
-rw-r--r--build2/variable.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/build2/variable.hxx b/build2/variable.hxx
index 5e6ad2f..01e7038 100644
--- a/build2/variable.hxx
+++ b/build2/variable.hxx
@@ -339,6 +339,9 @@ namespace build2
template <typename T> value& operator= (T);
template <typename T> value& operator+= (T);
+ template <typename T> value& operator= (T* v) {
+ return v != nullptr ? *this = *v : *this = nullptr;}
+
template <typename T> value& operator+= (T* v) {
return v != nullptr ? *this += *v : *this;}