New issue
Advanced search Search tips

Issue 831499 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Remove base::string_as_array in favor of base::data(std::string&)

Project Member Reported by jdoerrie@chromium.org, Apr 11 2018

Issue description

https://crrev.com/c/992236 introduced base::data(), modeled after C++17's std::data() [1]. Due to the lack of a non-const std::basic_string::data() in C++14 base::data() contains a special case for mutable strings. This special case provides a similar functionality to base::string_as_array. Since base::data() is more widely applicable, it is the preferred solution and existing usages of  base::string_as_array should be replaced by std::data(std::string&).

[1] http://en.cppreference.com/w/cpp/iterator/data
 
Cc: dcheng@chromium.org
Components: Internals
Labels: M-68
Owner: rsleevi@chromium.org
Status: Verified (was: Assigned)
D'oh, tagged https://chromium-review.googlesource.com/c/chromium/src/+/1056014 as  Issue 828324  rather than this. But TL;DR: string_as_array is gone.

Sign in to add a comment