Fix the reserve() of flat_map traits

By actually reserving with the given size for PR #6575.
This commit is contained in:
Jingyu Zhou 2022-03-11 17:18:17 -08:00
parent 402b463a26
commit e371854103
1 changed files with 3 additions and 1 deletions

View File

@ -240,7 +240,9 @@ struct vector_like_traits<boost::container::flat_map<Key, T, Compare, Allocator>
return v.size();
}
template <class Context>
static void reserve(Vec& v, size_t size, Context&) {}
static void reserve(Vec& v, size_t size, Context&) {
v.reserve(size);
}
template <class Context>
static insert_iterator insert(Vec& v, Context&) {