We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c7cb2a commit 5e91a05Copy full SHA for 5e91a05
1 file changed
tsl/array_map.h
@@ -226,7 +226,7 @@ class array_map {
226
}
227
228
for(auto it = first; it != last; ++it) {
229
- insert(it->first, it->second);
+ insert_pair(*it);
230
231
232
@@ -778,6 +778,17 @@ class array_map {
778
lhs.swap(rhs);
779
780
781
+private:
782
+ template<class U, class V>
783
+ void insert_pair(const std::pair<U, V>& value) {
784
+ insert(value.first, value.second);
785
+ }
786
+
787
788
+ void insert_pair(std::pair<U, V>&& value) {
789
+ insert(value.first, std::move(value.second));
790
791
792
public:
793
static const size_type MAX_KEY_SIZE = ht::MAX_KEY_SIZE;
794
0 commit comments