[PATCH] D24880: Add StringExtras join_items function

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 08:55:37 PDT 2016


zturner added inline comments.

================
Comment at: include/llvm/ADT/StringExtras.h:246
@@ +245,3 @@
+  size_t NI = detail::join_items_size(std::forward<Args>(Items)...);
+  Result.reserve(NI + (sizeof...(Items) - 1) * NS);
+  detail::join_items_impl(Result, Separator, std::forward<Args>(Items)...);
----------------
mehdi_amini wrote:
> Isn't there a missing + 1 for the trailing '\0' ?
Good catch.  I'll fix that locally, not worth uploading a new patch for though.


https://reviews.llvm.org/D24880





More information about the llvm-commits mailing list