[libcxx-commits] [libcxx] [libc++][NFC] Introduce __data() to std::string to replace std::__to_address(__get_pointer()) (PR #178212)

Oliver Stöneberg via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 27 07:01:50 PST 2026


================
@@ -3707,7 +3712,7 @@ __concatenate_strings(const _Allocator& __alloc,
   _String __r(__uninitialized_size_tag(),
               __str1.size() + __str2.size(),
               _String::__alloc_traits::select_on_container_copy_construction(__alloc));
-  auto __ptr = std::__to_address(__r.__get_pointer());
+  auto __ptr = __data();
----------------
firewave wrote:

Shouldn't this be `__r.__data()`?

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


More information about the libcxx-commits mailing list