| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 386 |
| 387 <tr> | 387 <tr> |
| 388 <td>Initializer Lists</td> | 388 <td>Initializer Lists</td> |
| 389 <td><code>std::initializer_list<T></code></td> | 389 <td><code>std::initializer_list<T></code></td> |
| 390 <td>Allows containers to be initialized with aggregate elements</td> | 390 <td>Allows containers to be initialized with aggregate elements</td> |
| 391 <td><a href="http://en.cppreference.com/w/cpp/utility/initializer_list">std::ini
tializer_list</a></td> | 391 <td><a href="http://en.cppreference.com/w/cpp/utility/initializer_list">std::ini
tializer_list</a></td> |
| 392 <td>Be cautious adding new constructors which take these, as they can hide non-i
nitializer_list constructors in undesirable ways; see Effective Modern C++ Item
7 for more.</td> | 392 <td>Be cautious adding new constructors which take these, as they can hide non-i
nitializer_list constructors in undesirable ways; see Effective Modern C++ Item
7 for more.</td> |
| 393 </tr> | 393 </tr> |
| 394 | 394 |
| 395 <tr> | 395 <tr> |
| 396 <td>Lexicographical struct comparison</td> | |
| 397 <td><code>tie(a, b, c) <<br> tie(rhs.a, rhs.b, rhs.c)</code></td> | |
| 398 <td>Idiom for <code>operator<</code> implementation</td> | |
| 399 <td><a href="http://en.cppreference.com/w/cpp/utility/tuple/tie">std::tie</a></t
d> | |
| 400 <td>General use of <code>std::tie</code> for unpacking or multiple assignments i
s still not allowed. <a href="https://groups.google.com/a/chromium.org/d/topic/c
xx/3DZ64dIMRTY/discussion">Discussion thread</a></td> | |
| 401 </tr> | |
| 402 | |
| 403 <tr> | |
| 404 <td>Math functions</td> | 396 <td>Math functions</td> |
| 405 <td>All C++11 features in <code><cmath></code>, e.g.:<br/> | 397 <td>All C++11 features in <code><cmath></code>, e.g.:<br/> |
| 406 <code>INFINITY</code>, <code>NAN</code>, <code>FP_NAN</code><br/> | 398 <code>INFINITY</code>, <code>NAN</code>, <code>FP_NAN</code><br/> |
| 407 <code>float_t</code>, <code>double_t</code><br/> | 399 <code>float_t</code>, <code>double_t</code><br/> |
| 408 <code>fmax</code>, <code>fmin</code>, <code>trunc</code>, <code>round</code><br/
> | 400 <code>fmax</code>, <code>fmin</code>, <code>trunc</code>, <code>round</code><br/
> |
| 409 <code>isinf</code>, <code>isnan</code><br/></td> | 401 <code>isinf</code>, <code>isnan</code><br/></td> |
| 410 <td>Useful for math-related code</td> | 402 <td>Useful for math-related code</td> |
| 411 <td><a href="http://en.cppreference.com/w/cpp/header/cmath"><cmath></a></t
d> | 403 <td><a href="http://en.cppreference.com/w/cpp/header/cmath"><cmath></a></t
d> |
| 412 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/P-1bFBXM
eUk">Discussion thread</a></td> | 404 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/P-1bFBXM
eUk">Discussion thread</a></td> |
| 413 </tr> | 405 </tr> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 444 <code>is_const</code>, <code>is_pod</code>, <code>is_unsigned</code><br/> | 436 <code>is_const</code>, <code>is_pod</code>, <code>is_unsigned</code><br/> |
| 445 <code>is_default_constructible</code>, <code>is_move_constructible</code>, <code
>is_copy_assignable</code><br/> | 437 <code>is_default_constructible</code>, <code>is_move_constructible</code>, <code
>is_copy_assignable</code><br/> |
| 446 <code>enable_if</code>, <code>conditional</code>, <code>result_of</code><br/></t
d> | 438 <code>enable_if</code>, <code>conditional</code>, <code>result_of</code><br/></t
d> |
| 447 <td>Allows compile-time inspection of the properties of types</td> | 439 <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> | 440 <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> | 441 <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> | 442 </tr> |
| 451 | 443 |
| 452 <tr> | 444 <tr> |
| 453 <td>Tuples</td> | 445 <td>Tuples</td> |
| 454 <td><code>std::tuple</code></td> | 446 <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> | 447 <td>A fixed-size ordered collection of values of mixed types</td> |
| 456 <td><a href="http://en.cppreference.com/w/cpp/utility/tuple">std::tuple</a></td> | 448 <td><a href="http://en.cppreference.com/w/cpp/header/tuple"><tuple></a></t
d> |
| 457 <td>Prefer over <a href="https://crbug.com/554987">base::Tuple</a>.</td> | 449 <td>Prefer <code>std::tuple</code> over <a href="https://crbug.com/554987"><code
>base::Tuple</code></a>.</td> |
| 458 </tr> | 450 </tr> |
| 459 | 451 |
| 460 <tr> | 452 <tr> |
| 461 <td>Unordered Associative Containers</td> | 453 <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> | 454 <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> | 455 <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> | 456 <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> | 457 <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> | 458 </tr> |
| 467 | 459 |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 <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> | 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> |
| 926 <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> | 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> |
| 927 </tr> | 919 </tr> |
| 928 | 920 |
| 929 </tbody> | 921 </tbody> |
| 930 </table> | 922 </table> |
| 931 | 923 |
| 932 </div> | 924 </div> |
| 933 </body> | 925 </body> |
| 934 </html> | 926 </html> |
| OLD | NEW |