This patch makes SmallSet::insert(const T &) return std::pair<const_iterator, bool> instead of std::pair<NoneType, bool>. This will exactly match std::set's behavior and make deduplicating items with SmallSet easier.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Sounds OK, with a minor improvement using structured bindings.
llvm/include/llvm/ADT/SmallSet.h | ||
---|---|---|
180–182 | Could use a structure binding here? | |
186 | Not sure the iterators need to be renamed - they're in distinct scopes and it'd probably be OK for them both to be named I despite them having different types. |
Could use a structure binding here?