[all-commits] [llvm/llvm-project] 8fcb60: [libc++][NFC] Introduce __data() to std::string to...

Nikolas Klauser via All-commits all-commits at lists.llvm.org
Wed Mar 4 01:19:57 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8fcb60aa47e792641dcbe6dcaa8b4a822a565cfc
      https://github.com/llvm/llvm-project/commit/8fcb60aa47e792641dcbe6dcaa8b4a822a565cfc
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2026-03-04 (Wed, 04 Mar 2026)

  Changed paths:
    M libcxx/include/string

  Log Message:
  -----------
  [libc++][NFC] Introduce __data() to std::string to replace std::__to_address(__get_pointer()) (#178212)

`std::__to_address(__get_pointer())` is an extremely common pattern
inside `string` and is basically equivalent to `data()`, except that
`data()` only returns a non-const pointer since C++17. This patch
introduces `__data()` to back-port returning a non-const pointer.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list