From 67d799852492743a93a464002395ccb624514fb8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 30 Jan 2021 11:25:42 +0200 Subject: Add std::{map, multimap} to types.hxx Seeing that std::map is becoming a common Buildfile variable type. --- libbuild2/variable.txx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'libbuild2/variable.txx') 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& p (v ? v.as> () : *new (&v.data_) map ()); @@ -840,8 +838,6 @@ namespace build2 void map_prepend (value& v, names&& ns, const variable* var) { - using std::map; - map& p (v ? v.as> () : *new (&v.data_) map ()); @@ -869,8 +865,6 @@ namespace build2 void map_assign (value& v, names&& ns, const variable* var) { - using std::map; - if (v) v.as> ().clear (); @@ -881,8 +875,6 @@ namespace build2 static names_view map_reverse (const value& v, names& s) { - using std::map; - auto& vm (v.as> ()); 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> ()); auto& rm (r.as> ()); @@ -975,11 +965,11 @@ namespace build2 }; template - const std::map value_traits>::empty_instance; + const map value_traits>::empty_instance; template const map_value_type - value_traits>::value_type = build2::value_type // VC14 wants = + value_traits>::value_type = build2::value_type // VC14 wants = { nullptr, // Patched above. sizeof (map), -- cgit v1.1