OLD | NEW |
---|---|
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 Loading... | |
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"><type_trait s></a></td> | 448 <td><a href="http://en.cppreference.com/w/cpp/header/type_traits"><type_trait s></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><tuple></code>, e.g. <code>std::tie</code> and <code>std::tuple</code>.</td> | 454 <td>All C++11 features in <code><tuple></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"><tuple></a></t d> | 456 <td><a href="http://en.cppreference.com/w/cpp/header/tuple"><tuple></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 <=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 Loading... | |
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> |
OLD | NEW |