aboutsummaryrefslogtreecommitdiff
path: root/build/variable
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-13 10:01:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-13 10:01:36 +0200
commitbef7c36a3479b9b83eaf4be9ef090b21d6468f12 (patch)
tree15a827bd6175a558dc0924b933cf3a6f9f0f9d88 /build/variable
parent4208f2d755f2bd2215051390f6500ccf54f1858f (diff)
Make subprojects list of name=subdir pairs
Diffstat (limited to 'build/variable')
-rw-r--r--build/variable7
1 files changed, 5 insertions, 2 deletions
diff --git a/build/variable b/build/variable
index 10e6247..2bb3393 100644
--- a/build/variable
+++ b/build/variable
@@ -35,10 +35,10 @@ namespace build
struct variable
{
explicit
- variable (std::string n): name (std::move (n)) {}
+ variable (std::string n, char p = '\0'): name (std::move (n)), pairs (p) {}
std::string name;
- char pairs = '\0';
+ char pairs;
//const value_type* type = nullptr; // If NULL, then no fixed type.
};
@@ -253,6 +253,9 @@ namespace build
//
const variable&
find (std::string name) {return *emplace (std::move (name)).first;}
+
+ const variable&
+ insert (variable v) {return *emplace (std::move (v)).first;}
};
extern variable_set variable_pool;