[libcxx-commits] [PATCH] D148693: [libc++] Set correct size at the end of growing std::string

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 17 21:27:38 PDT 2023


philnik added inline comments.


================
Comment at: libcxx/include/__string/extern_template_lists.h:58
   _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
+  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by_without_replace(size_type, size_type, size_type, size_type, size_type, size_type)) \
   _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
----------------
AdvenamTacet wrote:
> philnik wrote:
> > This is unfortunately also not possible (at least without some policy changes). Fortunately it's also not necessary for this patch.
> I don't understand.
Adding a new symbol to the dylib requires having availability annotations to aid in back-porting to older systems. If we add a new symbol in string, essentially all users would be required to target the latest OS when they use `std::string` in their programs, which isn't really an option.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148693



More information about the libcxx-commits mailing list