Currently, the SmallPtrSet type allows inserting elements but it does not support inserting elements with a positional hint. The lack of this signature means that you cannot use SmallPtrSet with std::insert_iterator or std::inserter(), which makes some code constructs more awkward. For example, it would be nice to be able to write:
llvm::copy_if(Buffer, std::inserter(SomeSmallPtrSet, SomeSmallPtrSet.begin()), [](...) { return whatever(); });The positional hint is unused by SmallPtrSet and the call is equivalent to calling insert() without a hint.
clang-format: please reformat the code
- iterator insert(iterator, PtrType Ptr) { - return insert(Ptr).first; - } + iterator insert(iterator, PtrType Ptr) { return insert(Ptr).first; }