aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/variable.hxx4
-rw-r--r--libbuild2/variable.ixx16
2 files changed, 19 insertions, 1 deletions
diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx
index 0eaf170..93f684b 100644
--- a/libbuild2/variable.hxx
+++ b/libbuild2/variable.hxx
@@ -344,6 +344,9 @@ namespace build2
template <typename T> value& operator= (T);
template <typename T> value& operator+= (T);
+ value& operator= (names);
+ value& operator+= (names);
+
template <typename T> value& operator= (T* v) {
return v != nullptr ? *this = *v : *this = nullptr;}
@@ -361,7 +364,6 @@ namespace build2
void append (names&&, const variable*);
void prepend (names&&, const variable*);
-
// Implementation details, don't use directly except in representation
// type implementations.
//
diff --git a/libbuild2/variable.ixx b/libbuild2/variable.ixx
index 4688d27..50cce78 100644
--- a/libbuild2/variable.ixx
+++ b/libbuild2/variable.ixx
@@ -101,6 +101,22 @@ namespace build2
return *this;
}
+ inline value& value::
+ operator= (names v)
+ {
+ assert (type == nullptr);
+ assign (move (v), nullptr);
+ return *this;
+ }
+
+ inline value& value::
+ operator+= (names v)
+ {
+ assert (type == nullptr);
+ append (move (v), nullptr);
+ return *this;
+ }
+
inline void value::
assign (name&& n, const variable* var)
{