From: Alex Coyte Date: Thu, 1 Sep 2016 04:40:17 +0000 (+1000) Subject: hinted insert operations for flat_set X-Git-Tag: v4.4.0^2~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aca89e66d22bca697724610e7c7f0f37816bf052;p=thirdparty%2Fvectorscan.git hinted insert operations for flat_set --- diff --git a/src/util/ue2_containers.h b/src/util/ue2_containers.h index 217d08ea..b6425f77 100644 --- a/src/util/ue2_containers.h +++ b/src/util/ue2_containers.h @@ -207,6 +207,10 @@ public: return std::make_pair(iterator(it), false); } + iterator insert(UNUSED const_iterator hint, const value_type &value) { + return insert(value).first; + } + std::pair insert(value_type &&value) { auto it = std::lower_bound(data.begin(), data.end(), value, comp); if (it == data.end() || comp(value, *it)) { @@ -216,6 +220,10 @@ public: return std::make_pair(iterator(it), false); } + iterator insert(UNUSED const_iterator hint, value_type &&value) { + return insert(value).first; + } + template void insert(InputIt first, InputIt second) { for (; first != second; ++first) {