<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Dec 1, 2020, at 4:41 PM, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" class="">dexonsmith@apple.com</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="">On Nov 30, 2020, at 6:04 PM, Sean Silva <<a href="mailto:chisophugis@gmail.com" class="">chisophugis@gmail.com</a>> wrote:</div></div></blockquote></div></div></div><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div class=""></div></div></blockquote></div></div></div></blockquote><blockquote type="cite" class="">I actually was mildly leaning to the "minimum 0" side, but after writing the above I'm now leaning towards "minimum 1".</blockquote><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class=""><br class=""></div><div class="">I'm fine with this as well.</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">On 2020 Dec 1, at 14:33, Chris Lattner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class=""><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class=""><blockquote type="cite" class=""><div class=""></div></blockquote></div></div></div></blockquote></blockquote></div></div></div></div><div class=""><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class=""><div class="">Overall, I’d recommend a path like this:</div></div></div></div></blockquote><br class=""></div><div class="">This path SGTM.</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class=""><div class="">1) We decide what to do about the default argument. I agree with Sean that SmallVector<T> should default to 1 at the minimum, and produce an error or warning of T. This makes sense given the bias towards a name that implies inline semantics.</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">As mentioned above, I think minimum 1 makes sense.</div><br class=""><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class=""><div class="">2) We decide whether we want to ban std::vector in the LLVM code base by convention. If so, I think that we should have a *separate* name for the out of line case, e.g. llvm::Vector<T>, which would be a good dual to llvm::SmallVector<T>. If this is the end point (Duncan seems to think it should be) then we should make this part of the coding standard and move the code base towards it over time.</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">(Yeah, I don't think we should allow use of std::vector; even though Mehdi discovered libc++ was changed, it'll be super frustrating to track down compile-time regressions that only occur on the non-libc++ bots or something; I don't think the problem goes away until we stop supporting being built with standard libraries without this)</div></div></div></div></blockquote><br class=""></div><div>Totally agree, it isn’t worth fighting this. It is sad that C++ can’t even get std::vector right, but at least it as a language allows us pragmatically make progress here.</div><div><br class=""></div><div>-Chris</div></body></html>