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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 5 07:48:15 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
----------------
ldionne wrote:

You can get rid of the `#ifdef` here. This type and `__short_layout_classic` can both be defined regardless of which one we end up picking for the actual string representation (based on the single `#ifdef` inside the `basic_string` class).

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


More information about the libcxx-commits mailing list