diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-01-30 11:25:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-01-30 11:25:42 +0200 |
commit | 67d799852492743a93a464002395ccb624514fb8 (patch) | |
tree | d46193a6c13f9cd64f9ff545b8b1f5fc441bab00 /libbuild2/variable.txx | |
parent | f6319b258bb478e19d4a17852a8406e6b1119b87 (diff) |
Add std::{map, multimap} to types.hxx
Seeing that std::map is becoming a common Buildfile variable type.
Diffstat (limited to 'libbuild2/variable.txx')
-rw-r--r-- | libbuild2/variable.txx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/libbuild2/variable.txx b/libbuild2/variable.txx index e1808fc..3e4a9f3 100644 --- a/libbuild2/variable.txx +++ b/libbuild2/variable.txx @@ -813,8 +813,6 @@ namespace build2 void map_append (value& v, names&& ns, const variable* var) { - using std::map; - map<K, V>& p (v ? v.as<map<K, V>> () : *new (&v.data_) map<K, V> ()); @@ -840,8 +838,6 @@ namespace build2 void map_prepend (value& v, names&& ns, const variable* var) { - using std::map; - map<K, V>& p (v ? v.as<map<K, V>> () : *new (&v.data_) map<K, V> ()); @@ -869,8 +865,6 @@ namespace build2 void map_assign (value& v, names&& ns, const variable* var) { - using std::map; - if (v) v.as<map<K, V>> ().clear (); @@ -881,8 +875,6 @@ namespace build2 static names_view map_reverse (const value& v, names& s) { - using std::map; - auto& vm (v.as<map<K, V>> ()); s.reserve (2 * vm.size ()); @@ -896,8 +888,6 @@ namespace build2 static int map_compare (const value& l, const value& r) { - using std::map; - auto& lm (l.as<map<K, V>> ()); auto& rm (r.as<map<K, V>> ()); @@ -975,11 +965,11 @@ namespace build2 }; template <typename K, typename V> - const std::map<K, V> value_traits<std::map<K, V>>::empty_instance; + const map<K, V> value_traits<map<K, V>>::empty_instance; template <typename K, typename V> const map_value_type<K, V> - value_traits<std::map<K, V>>::value_type = build2::value_type // VC14 wants = + value_traits<map<K, V>>::value_type = build2::value_type // VC14 wants = { nullptr, // Patched above. sizeof (map<K, V>), |