mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
hinted insert operations for flat_set
This commit is contained in:
parent
707fe675ea
commit
aca89e66d2
@ -207,6 +207,10 @@ public:
|
|||||||
return std::make_pair(iterator(it), false);
|
return std::make_pair(iterator(it), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iterator insert(UNUSED const_iterator hint, const value_type &value) {
|
||||||
|
return insert(value).first;
|
||||||
|
}
|
||||||
|
|
||||||
std::pair<iterator, bool> insert(value_type &&value) {
|
std::pair<iterator, bool> insert(value_type &&value) {
|
||||||
auto it = std::lower_bound(data.begin(), data.end(), value, comp);
|
auto it = std::lower_bound(data.begin(), data.end(), value, comp);
|
||||||
if (it == data.end() || comp(value, *it)) {
|
if (it == data.end() || comp(value, *it)) {
|
||||||
@ -216,6 +220,10 @@ public:
|
|||||||
return std::make_pair(iterator(it), false);
|
return std::make_pair(iterator(it), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iterator insert(UNUSED const_iterator hint, value_type &&value) {
|
||||||
|
return insert(value).first;
|
||||||
|
}
|
||||||
|
|
||||||
template <class InputIt>
|
template <class InputIt>
|
||||||
void insert(InputIt first, InputIt second) {
|
void insert(InputIt first, InputIt second) {
|
||||||
for (; first != second; ++first) {
|
for (; first != second; ++first) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user