From 266b8155ee6c55654937eb208405427e32b93c01 Mon Sep 17 00:00:00 2001 From: Barak Weiss Date: Sat, 28 Jan 2017 10:16:09 +0200 Subject: [PATCH 1/2] Support vector assign using an initializer list --- src/vector | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vector b/src/vector index 56295071..1c113e37 100644 --- a/src/vector +++ b/src/vector @@ -149,6 +149,11 @@ namespace std{ resize(n, u); } + _UCXXEXPORT void assign(initializer_list in){ + clear(); + insert(begin(), in.begin(), in.end()); + } + inline allocator_type get_allocator() const{ return a; } From 226aa591cc20fd00f5e86d5d7095a42baed6c013 Mon Sep 17 00:00:00 2001 From: Barak Weiss Date: Sat, 28 Jan 2017 10:17:22 +0200 Subject: [PATCH 2/2] Support initializing map using a pair initializer list --- src/map | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/map b/src/map index 038191af..44be7108 100644 --- a/src/map +++ b/src/map @@ -22,6 +22,7 @@ #include #include #include +#include #ifndef __STD_HEADER_MAP @@ -109,6 +110,10 @@ public: const Compare& comp = Compare(), const Allocator& al = Allocator()) : base(first, last, comp, al, v_t_k) { } + map(initializer_list> in, const Compare& comp = Compare(), + const Allocator& al = Allocator()) + : base(in.begin(), in.end(), comp, al, v_t_k) { } + map(const map& x) : base(x) { } ~map() { }