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

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

Issue 2080003002: base::Optional: Use anonymous union instead of base::AlignedMemory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« base/optional.h ('K') | « base/optional.h ('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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 <tr> 270 <tr>
271 <td>Uniform Initialization Syntax</td> 271 <td>Uniform Initialization Syntax</td>
272 <td><code><i>type</i> <i>name</i> {[<i>value</i> ..., <i>value</i>]};</code></td > 272 <td><code><i>type</i> <i>name</i> {[<i>value</i> ..., <i>value</i>]};</code></td >
273 <td>Allows any object of primitive, aggregate or class type to be initialized us ing brace syntax</td> 273 <td>Allows any object of primitive, aggregate or class type to be initialized us ing brace syntax</td>
274 <td><a href="http://www.stroustrup.com/C++11FAQ.html#uniform-init">Uniform initi alization syntax and semantics</a></td> 274 <td><a href="http://www.stroustrup.com/C++11FAQ.html#uniform-init">Uniform initi alization syntax and semantics</a></td>
275 <td>See the <a href="https://www.chromium.org/developers/coding-style/cpp-dos-an d-donts?pli=1#TOC-Variable-initialization">Chromium C++ Dos And Don'ts guidance< /a> on when to use this. <a href="https://groups.google.com/a/chromium.org/forum /#!topic/chromium-dev/GF96FshwHLw">Discussion thread</a></td> 275 <td>See the <a href="https://www.chromium.org/developers/coding-style/cpp-dos-an d-donts?pli=1#TOC-Variable-initialization">Chromium C++ Dos And Don'ts guidance< /a> on when to use this. <a href="https://groups.google.com/a/chromium.org/forum /#!topic/chromium-dev/GF96FshwHLw">Discussion thread</a></td>
276 </tr> 276 </tr>
277 277
278 <tr> 278 <tr>
279 <td>Union Class Members</td>
280 <td><code>union <i>name</i> {<i>class</i> <i>var</i>}</code></td>
281 <td>Allows class type members</td>
282 <td><a href="http://en.cppreference.com/w/cpp/language/union">Union declarations </a></td>
283 <td>Usage should be rare.</td>
284 </tr>
285
286 <tr>
279 <td>Variadic Macros</td> 287 <td>Variadic Macros</td>
280 <td><code>#define <i>MACRO</i>(...) <i>Impl</i>(<i>args</i>, __VA_ARGS__)</code> </td> 288 <td><code>#define <i>MACRO</i>(...) <i>Impl</i>(<i>args</i>, __VA_ARGS__)</code> </td>
281 <td>Allows macros that accept a variable number of arguments</td> 289 <td>Allows macros that accept a variable number of arguments</td>
282 <td><a href="http://stackoverflow.com/questions/4786649/are-variadic-macros-nons tandard">Are Variadic macros nonstandard?</a></td> 290 <td><a href="http://stackoverflow.com/questions/4786649/are-variadic-macros-nons tandard">Are Variadic macros nonstandard?</a></td>
283 <td>Usage should be rare. <a href="https://groups.google.com/a/chromium.org/foru m/#!topic/chromium-dev/sRx9j3CQqyA">Discussion thread</a></td> 291 <td>Usage should be rare. <a href="https://groups.google.com/a/chromium.org/foru m/#!topic/chromium-dev/sRx9j3CQqyA">Discussion thread</a></td>
284 </tr> 292 </tr>
285 293
286 <tr> 294 <tr>
287 <td>Variadic Templates</td> 295 <td>Variadic Templates</td>
288 <td><code>template &lt;<i>typename</i> ... <i>arg</i>&gt;</code></td> 296 <td><code>template &lt;<i>typename</i> ... <i>arg</i>&gt;</code></td>
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 676
669 <tr> 677 <tr>
670 <td>Inline Namespaces</td> 678 <td>Inline Namespaces</td>
671 <td><code>inline</code></td> 679 <td><code>inline</code></td>
672 <td>Allows better versioning of namespaces</td> 680 <td>Allows better versioning of namespaces</td>
673 <td><a href="http://en.cppreference.com/w/cpp/language/namespace">Namespaces</a> </td> 681 <td><a href="http://en.cppreference.com/w/cpp/language/namespace">Namespaces</a> </td>
674 <td>Unclear how it will work with components</td> 682 <td>Unclear how it will work with components</td>
675 </tr> 683 </tr>
676 684
677 <tr> 685 <tr>
678 <td>Union Class Members</td>
679 <td><code>union <i>name</i> {<i>class</i> <i>var</i>}</code></td>
680 <td>Allows class type members</td>
681 <td><a href="http://en.cppreference.com/w/cpp/language/union">Union declarations </a></td>
682 <td></td>
683 </tr>
684
685 <tr>
686 <td>User-Defined Literals</td> 686 <td>User-Defined Literals</td>
687 <td><code><i>type</i> <i>var</i> = <i>literal_value</i>_<i>type</i></code></td> 687 <td><code><i>type</i> <i>var</i> = <i>literal_value</i>_<i>type</i></code></td>
688 <td>Allows user-defined literal expressions</td> 688 <td>Allows user-defined literal expressions</td>
689 <td><a href="http://en.cppreference.com/w/cpp/language/user_literal">User-define d literals</a></td> 689 <td><a href="http://en.cppreference.com/w/cpp/language/user_literal">User-define d literals</a></td>
690 <td></td> 690 <td></td>
691 </tr> 691 </tr>
692 692
693 </tbody> 693 </tbody>
694 </table> 694 </table>
695 695
(...skipping 221 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> 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>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>
919 </tr> 919 </tr>
920 920
921 </tbody> 921 </tbody>
922 </table> 922 </table>
923 923
924 </div> 924 </div>
925 </body> 925 </body>
926 </html> 926 </html>
OLDNEW
« base/optional.h ('K') | « base/optional.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698