summaryrefslogtreecommitdiffstats
path: root/styleguide
diff options
context:
space:
mode:
authordavidben <davidben@chromium.org>2015-11-19 11:07:06 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-19 19:08:51 +0000
commit4507eaa1a845d080078f4e3e5ee2dd2bb1716e3e (patch)
tree79d04a6e3d605da192985c144c875ebe9855ebb8 /styleguide
parent119d0f4fe5ffa8463cb49ac8512cb04e07fd2c1c (diff)
downloadchromium_src-4507eaa1a845d080078f4e3e5ee2dd2bb1716e3e.zip
chromium_src-4507eaa1a845d080078f4e3e5ee2dd2bb1716e3e.tar.gz
chromium_src-4507eaa1a845d080078f4e3e5ee2dd2bb1716e3e.tar.bz2
Make vector_as_array use std::vector::data and switch a few directories.
Get //base and //crypto. This revealed an IWYU problem in //components/policy, so go and convert that too. BUG=556678 Review URL: https://codereview.chromium.org/1441543002 Cr-Commit-Position: refs/heads/master@{#360639}
Diffstat (limited to 'styleguide')
-rw-r--r--styleguide/c++/c++11.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html
index f0e39b8..962de84 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -290,6 +290,14 @@ Parameter pack</a></td>
</tr>
<tr>
+<td>Access to underlying <code>std::vector</code> data</td>
+<td><code>v.data()</code></td>
+<td>Returns a pointer to a <code>std::vector</code>'s underlying data, accounting for empty vectors.</td>
+<td><a href="http://en.cppreference.com/w/cpp/container/vector/data">std::vector::data</a></td>
+<td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/16V7fmtbzok">Discussion thread</a>.</td>
+</tr>
+
+<tr>
<td>Containers containing movable types</td>
<td><code>vector&lt;scoped_ptr&gt;</code></td>
<td>Enables containers that contain move-only types like <code>scoped_ptr</code></td>