diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-04 16:17:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-04 16:17:11 +0200 |
commit | a975e8e96dd0c39e576b9e44a4c35eeef47ebe76 (patch) | |
tree | e143838c46118a71a34e94de9664d6c718be9709 /build/variable.txx | |
parent | 9c4ce4464b2a0dae55b7cfb2ec5fc4bd7ffc40ae (diff) |
Fix static initialization order issue
Diffstat (limited to 'build/variable.txx')
-rw-r--r-- | build/variable.txx | 14 |
1 files changed, 11 insertions, 3 deletions
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> }; |