This is an automated email from the ASF dual-hosted git repository. alsay pushed a commit to branch tuple_sketch in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-cpp.git
commit 0d0bdc339e6ee12086d53a52660338dbb59a786a Author: AlexanderSaydakov <[email protected]> AuthorDate: Wed Jul 8 22:59:30 2020 -0700 avoid requiring default constructor for user type --- tuple/include/theta_union_base_impl.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tuple/include/theta_union_base_impl.hpp b/tuple/include/theta_union_base_impl.hpp index ae56859..10e4478 100644 --- a/tuple/include/theta_union_base_impl.hpp +++ b/tuple/include/theta_union_base_impl.hpp @@ -64,7 +64,8 @@ CS theta_union_base<EN, EK, P, S, CS, A>::get_result(bool ordered) const { if (entries.size() > nominal_num) { std::nth_element(entries.begin(), entries.begin() + nominal_num, entries.end(), comparator()); theta = EK()(entries[nominal_num]); - entries.resize(nominal_num); + entries.erase(entries.begin() + nominal_num, entries.end()); + entries.shrink_to_fit(); } } if (ordered) std::sort(entries.begin(), entries.end(), comparator()); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
