Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: styleguide/c++/c++11.html

Issue 2047013002: Add base::get to support rvalue-reference tuple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +test case Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/tuple_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2014 The Chromium Authors. All rights reserved. 3 Copyright 2014 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 <html> 7 <html>
8 <head> 8 <head>
9 <meta charset="utf-8"> 9 <meta charset="utf-8">
10 <title>C++11 use in Chromium</title> 10 <title>C++11 use in Chromium</title>
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 <td>Allows compile-time inspection of the properties of types</td> 447 <td>Allows compile-time inspection of the properties of types</td>
448 <td><a href="http://en.cppreference.com/w/cpp/header/type_traits">&lt;type_trait s&gt;</a></td> 448 <td><a href="http://en.cppreference.com/w/cpp/header/type_traits">&lt;type_trait s&gt;</a></td>
449 <td>Note that not all type traits are available on all platforms (e.g. <code>std ::underlying_type</code> doesn't work in libstdc++4.6). Use judiciously. <a href ='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discus sion thread</a></td> 449 <td>Note that not all type traits are available on all platforms (e.g. <code>std ::underlying_type</code> doesn't work in libstdc++4.6). Use judiciously. <a href ='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discus sion thread</a></td>
450 </tr> 450 </tr>
451 451
452 <tr> 452 <tr>
453 <td>Tuples</td> 453 <td>Tuples</td>
454 <td>All C++11 features in <code>&lt;tuple&gt;</code>, e.g. <code>std::tie</code> and <code>std::tuple</code>.</td> 454 <td>All C++11 features in <code>&lt;tuple&gt;</code>, e.g. <code>std::tie</code> and <code>std::tuple</code>.</td>
455 <td>A fixed-size ordered collection of values of mixed types</td> 455 <td>A fixed-size ordered collection of values of mixed types</td>
456 <td><a href="http://en.cppreference.com/w/cpp/header/tuple">&lt;tuple&gt;</a></t d> 456 <td><a href="http://en.cppreference.com/w/cpp/header/tuple">&lt;tuple&gt;</a></t d>
457 <td>Prefer <code>std::tuple</code> over <a href="https://crbug.com/554987"><code >base::Tuple</code></a>.</td> 457 <td>Use <code>base::get</code> instead of <code>std::get</code> in case the <cod e>std::tuple</code> may be a rvalue-reference.
danakj 2016/06/22 22:37:49 I think you want to keep this line, we do prefer u
tzik 2016/06/23 04:37:29 We already replaced all usage of base::Tuple with
danakj 2016/06/23 20:41:05 Ooh, okay. Woops.
458 <code>std::get</code> in &lt;=libstdc++-4.6 misses an overload for rvalue-refere nce of a tuple, and <code>base::get</code> complements it. </td>
458 </tr> 459 </tr>
459 460
460 <tr> 461 <tr>
461 <td>Unordered Associative Containers</td> 462 <td>Unordered Associative Containers</td>
462 <td><code>std::unordered_set</code>, <code>std::unordered_map</code>, <code>std: :unordered_multiset</code>, <code>std::unordered_multimap</code></td> 463 <td><code>std::unordered_set</code>, <code>std::unordered_map</code>, <code>std: :unordered_multiset</code>, <code>std::unordered_multimap</code></td>
463 <td>Allows efficient containers of key/value pairs</td> 464 <td>Allows efficient containers of key/value pairs</td>
464 <td><a href="http://en.cppreference.com/w/cpp/container/unordered_map">std::unor dered_map</a>, <a href="http://en.cppreference.com/w/cpp/container/unordered_set ">std::unordered_set</a></td> 465 <td><a href="http://en.cppreference.com/w/cpp/container/unordered_map">std::unor dered_map</a>, <a href="http://en.cppreference.com/w/cpp/container/unordered_set ">std::unordered_set</a></td>
465 <td>Per the <a href="https://google.github.io/styleguide/cppguide.html#std_hash" >Google Style Guide</a>, specify custom hashers instead of specializing <code>st d::hash</code> for custom types. <a href="https://groups.google.com/a/chromium.o rg/forum/#!topic/cxx/nCdjQqnouO4">Discussion thread</a>.</td> 466 <td>Per the <a href="https://google.github.io/styleguide/cppguide.html#std_hash" >Google Style Guide</a>, specify custom hashers instead of specializing <code>st d::hash</code> for custom types. <a href="https://groups.google.com/a/chromium.o rg/forum/#!topic/cxx/nCdjQqnouO4">Discussion thread</a>.</td>
466 </tr> 467 </tr>
467 468
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 <td><a href="http://en.cppreference.com/w/cpp/locale/wstring_convert">std::wstri ng_convert</a>, <a href="http://en.cppreference.com/w/cpp/locale/wbuffer_convert ">std::wbuffer_convert</a>, <a href="http://en.cppreference.com/w/cpp/locale/cod ecvt_utf8">std::codecvt_utf8</a>, <a href="http://en.cppreference.com/w/cpp/loca le/codecvt_utf16">std::codecvt_utf16</a>, <a href="http://en.cppreference.com/w/ cpp/locale/codecvt_utf8_utf16">std::codecvt_utf8_utf16</a></td> 918 <td><a href="http://en.cppreference.com/w/cpp/locale/wstring_convert">std::wstri ng_convert</a>, <a href="http://en.cppreference.com/w/cpp/locale/wbuffer_convert ">std::wbuffer_convert</a>, <a href="http://en.cppreference.com/w/cpp/locale/cod ecvt_utf8">std::codecvt_utf8</a>, <a href="http://en.cppreference.com/w/cpp/loca le/codecvt_utf16">std::codecvt_utf16</a>, <a href="http://en.cppreference.com/w/ cpp/locale/codecvt_utf8_utf16">std::codecvt_utf8_utf16</a></td>
918 <td>Non-UTF-8 text is banned by the <a href="https://google.github.io/styleguide /cppguide.html#Non-ASCII_Characters">Google Style Guide</a>. However, may be use ful for consuming non-ASCII data.</td> 919 <td>Non-UTF-8 text is banned by the <a href="https://google.github.io/styleguide /cppguide.html#Non-ASCII_Characters">Google Style Guide</a>. However, may be use ful for consuming non-ASCII data.</td>
919 </tr> 920 </tr>
920 921
921 </tbody> 922 </tbody>
922 </table> 923 </table>
923 924
924 </div> 925 </div>
925 </body> 926 </body>
926 </html> 927 </html>
OLDNEW
« no previous file with comments | « base/tuple_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698