Rename template parameter for a search value from 'ForwardIt' to 'T'.
While here, also use perfect forwarding to pass the value to STL algos.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 30311 Build 30310: arc lint + arc unit
Event Timeline
Might've made sense to separate the NFC renaming from the perfect forwarding change (& the perfect forwarding change could potentially have some matching test coverage?)
I agree, sorry about mashing them in together. That said, I was confident this wouldn't cause any trouble in practice.
What kinds of tests are you thinking about? Checking that llvm::lower_bound works on non-copyable types?
Yeah, that'd probably suffice (if you were being extra super robust, and we generally aren't with these thin wrappers, I guess you could test that the parameter can be a temporary and a non-const value where the underlying type or passed in comparator takes by non-const ref (that would test that the forwarding works for things that must be passed by const ref and things that can't be passed by const ref and must be non-const ref))
Sure, happy to add some basic tests.
Unfortunately did not get to this today and I'm on vacation until next Tuesday. Will get back to this after I'm back.