Skip to content

Commit 7ce4ebf

Browse files
committed
Merge branch 'master' of github.com:mike-matera/ArduinoSTL
2 parents e5655bb + 5db9224 commit 7ce4ebf

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/map

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <utility>
2323
#include <iterator>
2424
#include <associative_base>
25+
#include <initializer_list>
2526

2627

2728
#ifndef __STD_HEADER_MAP
@@ -109,6 +110,10 @@ public:
109110
const Compare& comp = Compare(), const Allocator& al = Allocator())
110111
: base(first, last, comp, al, v_t_k) { }
111112

113+
map(initializer_list<pair<Key, T>> in, const Compare& comp = Compare(),
114+
const Allocator& al = Allocator())
115+
: base(in.begin(), in.end(), comp, al, v_t_k) { }
116+
112117
map(const map<Key,T,Compare,Allocator>& x) : base(x) { }
113118
~map() { }
114119

src/vector

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ namespace std{
149149
resize(n, u);
150150
}
151151

152+
_UCXXEXPORT void assign(initializer_list<value_type> in){
153+
clear();
154+
insert(begin(), in.begin(), in.end());
155+
}
156+
152157
inline allocator_type get_allocator() const{
153158
return a;
154159
}

0 commit comments

Comments
 (0)