aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/variable4
-rw-r--r--build/variable.txx14
2 files changed, 14 insertions, 4 deletions
diff --git a/build/variable b/build/variable
index 3bd8922..2aec39d 100644
--- a/build/variable
+++ b/build/variable
@@ -32,7 +32,7 @@ namespace build
//
struct value_type
{
- const std::string name;
+ const char* name;
bool (*const assign) (names&, const variable&);
bool (*const append) (names&, names, const variable&);
};
@@ -437,6 +437,7 @@ namespace build
template <typename V> static void assign (value&, V);
template <typename V> static void append (value&, V);
+ static const std::string type_name;
static const build::value_type value_type;
};
@@ -566,6 +567,7 @@ namespace build
template <typename M> static void assign (value&, M);
template <typename M> static void append (value&, M);
+ static const std::string type_name;
static const build::value_type value_type;
};
diff --git a/build/variable.txx b/build/variable.txx
index 1b32584..e661879 100644
--- a/build/variable.txx
+++ b/build/variable.txx
@@ -45,9 +45,13 @@ namespace build
}
template <typename T>
+ const std::string value_traits<std::vector<T>>::type_name = std::string (
+ value_traits<T>::value_type.name) + 's';
+
+ template <typename T>
const value_type value_traits<std::vector<T>>::value_type
{
- value_traits<T>::value_type.name + 's',
+ value_traits<std::vector<T>>::type_name.c_str (),
&vector_assign<T>,
&vector_append<T>
};
@@ -150,10 +154,14 @@ namespace build
}
template <typename K, typename V>
+ const std::string value_traits<std::map<K, V>>::type_name = std::string (
+ value_traits<K>::value_type.name) + '_' +
+ value_traits<V>::value_type.name + "_map";
+
+ template <typename K, typename V>
const value_type value_traits<std::map<K, V>>::value_type
{
- value_traits<K>::value_type.name + '_' +
- value_traits<V>::value_type.name + "_map",
+ value_traits<std::map<K, V>>::type_name.c_str (),
&map_assign<K, V>,
&map_append<K, V>
};