16 Sep
2015
16 Sep
'15
12:13 p.m.
[snip]
how come? i get that it's exposing the implementation, but the gains would
be so so massive. and the name flat_ basically confirms the use of a sorted vector internally.
Moving in a std::vector would force the flat_set to be implemented in terms of a std::vector. However, what about a type from flat_set, e.g. flat_set<T>::storage and document what concept this storage implements (e.g. Random Access Container), and then we could do what you want in a maybe cleaner way.
flat_set<T>::storage data; // fill data flat_set<T> the_set{std::move(data)};
yeah that would be perfect!