[libcxx-commits] [libcxx] [libc++][string] Remove potential non-trailing 0-length array (PR #105865)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 29 01:43:25 PDT 2024


================
@@ -748,6 +748,41 @@ struct __can_be_converted_to_string_view
 struct __uninitialized_size_tag {};
 struct __init_with_sentinel_tag {};
 
+#ifdef _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
+template <class _CharT, size_t __min_cap, size_t _Padding = sizeof(_CharT) - 1>
+struct __short_impl {
----------------
serge-sans-paille wrote:

I've updated the patch accordingly, with a guard on the individual types too.

https://github.com/llvm/llvm-project/pull/105865


More information about the libcxx-commits mailing list