A default calculated size for SmallVector was added in
https://reviews.llvm.org/D92522 after discussion in
https://groups.google.com/g/llvm-dev/c/Z-VwNCTRGSg, but to_vector still
requires an explicit size. This patch adds the default size to to_vector
as well, so that this case doesn't unnecessarily force users to pick an
arbitrary size.
Details
Details
- Reviewers
silvas dblaikie - Commits
- rGc92de29f8d39: [NFC] Add size inference to to_vector
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This looks good to me. @rriddle @dexonsmith @dblaikie for thoughts.
Also, does this break any existing code? Or does overloading "just work" for the new defaulting case.
Comment Actions
I'm pretty sure it "just works", but am waiting on pre-merge checks.
I suppose I should actually add a usage of the new default case :-D I'll go do that.
Comment Actions
Could do with a unit test in any case, but let's see about the implementation...
Yeah, I'm OK with it if it passes builds/bootstraps/bots/etc.