aboutsummaryrefslogtreecommitdiff
path: root/build/variable
diff options
context:
space:
mode:
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;