| 557 | |
| 558 | template <typename InputIt> |
| 559 | void insert(InputIt first, InputIt last) |
| 560 | { |
| 561 | for (auto it = first; it != last; ++it) |
| 562 | { |
| 563 | members_.emplace_back(key_type((*it).first.c_str(), (*it).first.size(), get_allocator()), (*it).second); |
| 564 | } |
| 565 | std::stable_sort(members_.begin(),members_.end(), |
| 566 | [](const key_value_type& a, const key_value_type& b) -> bool {return a.key().compare(b.key()) < 0;}); |
| 567 | auto last2 = std::unique(members_.begin(), members_.end(), |
| 568 | [](const key_value_type& a, const key_value_type& b) -> bool { return !(a.key().compare(b.key()));}); |
| 569 | members_.erase(last2, members_.end()); |
| 570 | } |
| 571 | |
| 572 | template <typename InputIt> |
| 573 | void insert(sorted_unique_range_tag, InputIt first, InputIt last) |