aboutsummaryrefslogtreecommitdiff
path: root/build2/variable.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-05-03 15:04:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-05-03 15:09:40 +0200
commita8c2fa28947960cce78d905ac9bbcb490ec78382 (patch)
treec142c3910338cdfe77f6324f122cbfb474ec71dd /build2/variable.hxx
parentf0da422177d416aef2e446b23e8bbf2ec79a9aab (diff)
Add config.{c,cxx}.std
These values override {c,cxx}.std specified at the project level. In particular, this allows us to force a specific standard for all the projects in a build configuration, for example: b create: conf/,cc config.cxx=g++ config.cxx.std=experimental
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;}