[libcxx-commits] [PATCH] D61109: Remove incorrect explicit instantiation declarations for valarray

Richard Smith - zygoloid via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 25 15:13:43 PDT 2019


rsmith added inline comments.


================
Comment at: src/valarray.cpp:13
 
+#if _LIBCPP_ABI_VERSION == 1
 template valarray<size_t>::valarray(size_t);
----------------
ldionne wrote:
> rsmith wrote:
> > ldionne wrote:
> > > Can you add a comment explaining why we're doing this here?
> > Done, but I'm not sure why these are removed from the V2 ABI so I'm afraid it's a little vague.
> Well, they're removed because they will never be used (since there's no explicit instantiation declaration), right? My understanding is that the only reason for providing them in ABI v1 is to avoid removing symbols (and code) that already-compiled binaries might depend on, however newly compiled code will never use it. If that is incorrect, then I did not understand this patch.
Well... I agree, but that doesn't really explain why we don't want these to be part of the V2 ABI, which is what I think I'd want to know as a reader of this code. (Why were these deemed suitable for inclusion in the V1 ABI but not in the V2 ABI? Why is `valarray<size_t>::resize` still part of the V2 ABI?)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61109/new/

https://reviews.llvm.org/D61109





More information about the libcxx-commits mailing list