Skip to content

Commit 7bebfa4

Browse files
zetafunctionCommit bot
authored and
Commit bot
committed
Move std::unique_ptr to the C++11 allowed library features section.
BUG=554298 Review URL: https://codereview.chromium.org/1855113002 Cr-Commit-Position: refs/heads/master@{#384838}
1 parent 03c6cc1 commit 7bebfa4

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

styleguide/c++/c++11.html

+15-16
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,16 @@ <h2 id="whitelist"><a name="library-whitelist"></a>C++11 Allowed Library Feature
467467
<td>Note that not all type traits are available on all platforms (eg std::underlying_type doesn't work in libstdc++4.6). Use judiciously. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discussion thread</a></td>
468468
</tr>
469469

470+
<tr>
471+
<td>Tuples</td>
472+
<td><code>std::tuple</code></td>
473+
<td>A fixed-size ordered collection of values of mixed types</td>
474+
<td><a href="http://en.cppreference.com/w/cpp/utility/tuple">std::tuple</a></td>
475+
<td><a href="https://crbug.com/554987">Tracking bug</a> to plan moving from <code>base::Tuple</code> to <code>std::tuple</code>. See also <code>std::tie</code>.
476+
<code>base::Tuple</code> is now an alias for <code>std::tuple</code>. In class template specializations, use <code>std::tuple</code> instead of <code>base::Tuple</code> to work around a MSVS2013 internal compiler error (Error code: C1001).
477+
</td>
478+
</tr>
479+
470480
<tr>
471481
<td>Unordered Associative Containers</td>
472482
<td><code>std::unordered_set</code>, <code>std::unordered_map</code>,
@@ -479,13 +489,11 @@ <h2 id="whitelist"><a name="library-whitelist"></a>C++11 Allowed Library Feature
479489
</tr>
480490

481491
<tr>
482-
<td>Tuples</td>
483-
<td><code>std::tuple</code></td>
484-
<td>A fixed-size ordered collection of values of mixed types</td>
485-
<td><a href="http://en.cppreference.com/w/cpp/utility/tuple">std::tuple</a></td>
486-
<td><a href="https://crbug.com/554987">Tracking bug</a> to plan moving from <code>base::Tuple</code> to <code>std::tuple</code>. See also <code>std::tie</code>.
487-
<code>base::Tuple</code> is now an alias for <code>std::tuple</code>. In class template specializations, use <code>std::tuple</code> instead of <code>base::Tuple</code> to work around a MSVS2013 internal compiler error (Error code: C1001).
488-
</td>
492+
<td>Unique Pointers</td>
493+
<td><code>std::unique_ptr&lt;<i>type</i>&gt;</code></td>
494+
<td>A smart pointer with sole ownership of the owned object.</td>
495+
<td><a href="http://en.cppreference.com/w/cpp/memory/unique_ptr">std::unique_ptr</a></td>
496+
<td>Google style guide: <a href="https://google.github.io/styleguide/cppguide.html#Ownership_and_Smart_Pointers">Ownership and Smart Pointers</a>. <a href="https://groups.google.com/a/chromium.org/d/msg/cxx/aT2wsBLKvzI/oZuZ718oAwAJ">Discussion thread</a>. Use in all newly written code. scoped_ptr is a <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-dev/roY78iTblYc/bb8nYsxfCgAJ">typedef for std::unique_ptr</a> and is going away shortly.</td>
489497
</tr>
490498

491499
</tbody>
@@ -1059,15 +1067,6 @@ <h3 id="blacklist_stdlib_review"><a name="library-review"></a>C++11 Standard Lib
10591067
within both associative and unordered containers</td>
10601068
</tr>
10611069

1062-
<tr>
1063-
<td>Unique Pointers</td>
1064-
<td><code>std::unique_ptr&lt;<i>type</i>&gt;</code></td>
1065-
<td>Defines a pointer with clear and unambiguous ownership</td>
1066-
<td>TODO: documentation link</td>
1067-
<td><a href="https://google.github.io/styleguide/cppguide.html#Ownership_and_Smart_Pointers">
1068-
Ownership and Smart Pointers</a></td>
1069-
</tr>
1070-
10711070
<tr>
10721071
<td>Variadic Copy Macro</td>
10731072
<td><code>va_copy(va_list <i>dest</i>, va_list <i>src</i>)</code></td>

0 commit comments

Comments
 (0)