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

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: rebase Created 4 years, 4 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') | « docs/optional.md ('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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 <tr> 281 <tr>
282 <td>Uniform Initialization Syntax</td> 282 <td>Uniform Initialization Syntax</td>
283 <td><code><i>type</i> <i>name</i> {[<i>value</i> ..., <i>value</i>]};</code></td > 283 <td><code><i>type</i> <i>name</i> {[<i>value</i> ..., <i>value</i>]};</code></td >
284 <td>Allows any object of primitive, aggregate or class type to be initialized us ing brace syntax</td> 284 <td>Allows any object of primitive, aggregate or class type to be initialized us ing brace syntax</td>
285 <td><a href="http://www.stroustrup.com/C++11FAQ.html#uniform-init">Uniform initi alization syntax and semantics</a></td> 285 <td><a href="http://www.stroustrup.com/C++11FAQ.html#uniform-init">Uniform initi alization syntax and semantics</a></td>
286 <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> 286 <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>
287 </tr> 287 </tr>
288 288
289 <tr> 289 <tr>
290 <td>Union Class Members</td>
291 <td><code>union <i>name</i> {<i>class</i> <i>var</i>}</code></td>
292 <td>Allows class type members</td>
293 <td><a href="http://en.cppreference.com/w/cpp/language/union">Union declarations </a></td>
294 <td>Usage should be rare.</td>
295 </tr>
296
297 <tr>
290 <td>Variadic Macros</td> 298 <td>Variadic Macros</td>
291 <td><code>#define <i>MACRO</i>(...) <i>Impl</i>(<i>args</i>, __VA_ARGS__)</code> </td> 299 <td><code>#define <i>MACRO</i>(...) <i>Impl</i>(<i>args</i>, __VA_ARGS__)</code> </td>
292 <td>Allows macros that accept a variable number of arguments</td> 300 <td>Allows macros that accept a variable number of arguments</td>
293 <td><a href="http://stackoverflow.com/questions/4786649/are-variadic-macros-nons tandard">Are Variadic macros nonstandard?</a></td> 301 <td><a href="http://stackoverflow.com/questions/4786649/are-variadic-macros-nons tandard">Are Variadic macros nonstandard?</a></td>
294 <td>Usage should be rare. <a href="https://groups.google.com/a/chromium.org/foru m/#!topic/chromium-dev/sRx9j3CQqyA">Discussion thread</a></td> 302 <td>Usage should be rare. <a href="https://groups.google.com/a/chromium.org/foru m/#!topic/chromium-dev/sRx9j3CQqyA">Discussion thread</a></td>
295 </tr> 303 </tr>
296 304
297 <tr> 305 <tr>
298 <td>Variadic Templates</td> 306 <td>Variadic Templates</td>
299 <td><code>template &lt;<i>typename</i> ... <i>arg</i>&gt;</code></td> 307 <td><code>template &lt;<i>typename</i> ... <i>arg</i>&gt;</code></td>
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 680
673 <tr> 681 <tr>
674 <td>Inline Namespaces</td> 682 <td>Inline Namespaces</td>
675 <td><code>inline</code></td> 683 <td><code>inline</code></td>
676 <td>Allows better versioning of namespaces</td> 684 <td>Allows better versioning of namespaces</td>
677 <td><a href="http://en.cppreference.com/w/cpp/language/namespace">Namespaces</a> </td> 685 <td><a href="http://en.cppreference.com/w/cpp/language/namespace">Namespaces</a> </td>
678 <td>Unclear how it will work with components</td> 686 <td>Unclear how it will work with components</td>
679 </tr> 687 </tr>
680 688
681 <tr> 689 <tr>
682 <td>Union Class Members</td>
683 <td><code>union <i>name</i> {<i>class</i> <i>var</i>}</code></td>
684 <td>Allows class type members</td>
685 <td><a href="http://en.cppreference.com/w/cpp/language/union">Union declarations </a></td>
686 <td></td>
687 </tr>
688
689 <tr>
690 <td>User-Defined Literals</td> 690 <td>User-Defined Literals</td>
691 <td><code><i>type</i> <i>var</i> = <i>literal_value</i>_<i>type</i></code></td> 691 <td><code><i>type</i> <i>var</i> = <i>literal_value</i>_<i>type</i></code></td>
692 <td>Allows user-defined literal expressions</td> 692 <td>Allows user-defined literal expressions</td>
693 <td><a href="http://en.cppreference.com/w/cpp/language/user_literal">User-define d literals</a></td> 693 <td><a href="http://en.cppreference.com/w/cpp/language/user_literal">User-define d literals</a></td>
694 <td></td> 694 <td></td>
695 </tr> 695 </tr>
696 696
697 </tbody> 697 </tbody>
698 </table> 698 </table>
699 699
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 <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> 921 <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>
922 <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> 922 <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>
923 </tr> 923 </tr>
924 924
925 </tbody> 925 </tbody>
926 </table> 926 </table>
927 927
928 </div> 928 </div>
929 </body> 929 </body>
930 </html> 930 </html>
OLDNEW
« base/optional.h ('K') | « docs/optional.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698