Chromium Code Reviews| 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 <link rel="stylesheet" href="c++11.css"> | 10 <link rel="stylesheet" href="c++11.css"> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 <td><a href="http://stackoverflow.com/questions/15785496/c-templates-angle-brack ets-pitfall-what-is-the-c11-fix"> | 63 <td><a href="http://stackoverflow.com/questions/15785496/c-templates-angle-brack ets-pitfall-what-is-the-c11-fix"> |
| 64 C++ Templates Angle Brackets Pitfall</a></td> | 64 C++ Templates Angle Brackets Pitfall</a></td> |
| 65 <td>Recommended to increase readability. Approved without discussion.</td> | 65 <td>Recommended to increase readability. Approved without discussion.</td> |
| 66 </tr> | 66 </tr> |
| 67 | 67 |
| 68 <tr> | 68 <tr> |
| 69 <td>Final Specifier</td> | 69 <td>Final Specifier</td> |
| 70 <td><code>final</code></td> | 70 <td><code>final</code></td> |
| 71 <td> Indicates that a class or function is final and cannot be overridden</td> | 71 <td> Indicates that a class or function is final and cannot be overridden</td> |
| 72 <td><a href="http://en.cppreference.com/w/cpp/language/final">final Language Ref erence</a></td> | 72 <td><a href="http://en.cppreference.com/w/cpp/language/final">final Language Ref erence</a></td> |
| 73 <td>Recommended for new code. Existing uses of the <code>FINAL</code> macro will be <a href="https://crbug.com/417463">replaced throughout the codebase</a>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/VTNZzi zN0zo">Discussion</a></td> | 73 <td>Recommended for new code. Existing uses of the <code>FINAL</code> macro will be <a href="https://crbug.com/417463">replaced throughout the codebase</a>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/VTNZzi zN0zo">Discussion thread</a></td> |
| 74 </tr> | 74 </tr> |
| 75 | 75 |
| 76 <tr> | 76 <tr> |
| 77 <td>Local Types as Template Arguments</td> | 77 <td>Local Types as Template Arguments</td> |
| 78 <td></td> | 78 <td></td> |
| 79 <td>Allows local and unnamed types as template arguments</td> | 79 <td>Allows local and unnamed types as template arguments</td> |
| 80 <td><a href="http://stackoverflow.com/questions/742607/using-local-classes-with- stl-algorithms"> | 80 <td><a href="http://stackoverflow.com/questions/742607/using-local-classes-with- stl-algorithms"> |
| 81 Local types, types without linkage and unnamed types as template arguments</a></ td> | 81 Local types, types without linkage and unnamed types as template arguments</a></ td> |
| 82 <td>Usage should be rare. Approved without discussion.</td> | 82 <td>Usage should be rare. Approved without discussion.</td> |
| 83 </tr> | 83 </tr> |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 114 | 114 |
| 115 </tbody> | 115 </tbody> |
| 116 </table> | 116 </table> |
| 117 | 117 |
| 118 <h2 id="blacklist">C++11 Blacklist (Disallowed and Banned Features)</h2> | 118 <h2 id="blacklist">C++11 Blacklist (Disallowed and Banned Features)</h2> |
| 119 | 119 |
| 120 <p>This section lists features that are not allowed to be used yet. | 120 <p>This section lists features that are not allowed to be used yet. |
| 121 | 121 |
| 122 <h3 id="blacklist_banned">C++11 Banned Features</h3> | 122 <h3 id="blacklist_banned">C++11 Banned Features</h3> |
| 123 | 123 |
| 124 <p>None yet! This section will list C++11 features that are not allowed in the | 124 <p>This section will list C++11 features that are not allowed in the Chromium |
| 125 Chromium codebase. | 125 codebase. |
| 126 </p> | 126 </p> |
| 127 | 127 |
| 128 <!-- | |
| 129 <table id="banned_list" class="unlined striped"> | 128 <table id="banned_list" class="unlined striped"> |
| 130 <tbody> | 129 <tbody> |
| 131 | 130 |
| 132 <tr> | 131 <tr> |
| 133 <th style='width:240px;'>Feature or Library</th> | 132 <th style='width:240px;'>Feature or Library</th> |
| 134 <th style='width:240px;'>Snippet</th> | 133 <th style='width:240px;'>Snippet</th> |
| 135 <th style='width:240px;'>Description</th> | 134 <th style='width:240px;'>Description</th> |
| 136 <th style='width:240px;'>Documentation Link</th> | 135 <th style='width:240px;'>Documentation Link</th> |
| 137 <th style='width:240px;'>Status</th> | 136 <th style='width:240px;'>Notes</th> |
| 137 </tr> | |
| 138 | |
| 139 <tr> | |
| 140 <td>Constant Expressions</td> | |
| 141 <td><code>constexpr</code></td> | |
| 142 <td>Compile-time constant expressions</td> | |
| 143 <td>TODO: documentation link</td> | |
|
jamesr
2014/09/25 06:01:52
could we link to a crbug for these things? that wa
| |
| 144 <td>Doesn't work in MSVS2013. Reevalute once it does.<a | |
| 145 href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#constexpr ">Google | |
| 146 Style Guide on <code>constexpr</code></a></td> | |
| 147 </tr> | |
| 148 | |
| 149 <tr> | |
| 150 <td>Function Local Variable</td> | |
| 151 <td><code>__func__</code></td> | |
| 152 <td>Provides a local variable of the name of the enclosing | |
| 153 function for logging purposes</td> | |
| 154 <td><a href="http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum= 338"> | |
| 155 The __func__ Predeclared Identifier is Coming to C++</a></td> | |
| 156 <td>Doesn't work in MSVS2013. Reevaluate once it does. <a href="https://groups.g oogle.com/a/chromium.org/forum/#!topic/chromium-dev/ojGfcgSDzHM">Discussion thre ad</a></td> | |
| 157 </tr> | |
| 158 | |
| 159 <tr> | |
| 160 <td>UTF-16 and UTF-32 Support (16-Bit and 32-Bit Character Types)</td> | |
| 161 <td><code>char16_t</code> and <code>char32_t</code></td> | |
| 162 <td>Provides character types for handling 16-bit | |
| 163 and 32-bit code units (useful for encoding | |
| 164 UTF-16 and UTF-32 string data)</td> | |
| 165 <td><a href="http://en.cppreference.com/w/cpp/language/types"> | |
| 166 Fundamental types</a></td> | |
| 167 <td>Doesn't work in MSVS2013. Reevaluate once it does. Non-UTF-8 text is | |
| 168 banned by the | |
| 169 <a href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Non-AS CII_Characters"> | |
| 170 C++ Style Guide</a>. However, may be useful for | |
| 171 consuming non-ASCII data. <a href="https://groups.google.com/a/chromium.org/foru m/#!topic/chromium-dev/ME2kL7_Kvyk">Discussion thread</a></td> | |
| 172 </tr> | |
| 173 | |
| 174 <tr> | |
| 175 <td>UTF-8, UTF-16, UTF-32 String Literals</td> | |
| 176 <td><code>u8"<i>string</i>", u"<i>string</i>", U"<i>str ing</i>"</code></td> | |
| 177 <td>Enforces UTF-8, UTF-16, UTF-32 encoding on all string literals</td> | |
| 178 <td><a href="http://en.cppreference.com/w/cpp/language/string_literal"> | |
| 179 string literal</a></td> | |
| 180 <td>Does not yet work in MSVS2013. Reevaluate once it does. <a href="https://gro ups.google.com/a/chromium.org/forum/#!topic/chromium-dev/gcoUbcjfsII">Discussion thread</a></td> | |
| 138 </tr> | 181 </tr> |
| 139 | 182 |
| 140 </tbody> | 183 </tbody> |
| 141 </table> | 184 </table> |
| 142 --> | |
| 143 | 185 |
| 144 <h3 id="blacklist_review">C++11 Features To Be Discussed</h3> | 186 <h3 id="blacklist_review">C++11 Features To Be Discussed</h3> |
| 145 | 187 |
| 146 <p>The following C++ language features are currently disallowed. | 188 <p>The following C++ language features are currently disallowed. |
| 147 See the top of this page on how to propose moving a feature from this list | 189 See the top of this page on how to propose moving a feature from this list |
| 148 into the allowed or banned sections. Note that not all of these features | 190 into the allowed or banned sections. Note that not all of these features |
| 149 work in all our compilers yet.</p> | 191 work in all our compilers yet.</p> |
| 150 | 192 |
| 151 <table id="blacklist_review_list" class="unlined striped"> | 193 <table id="blacklist_review_list" class="unlined striped"> |
| 152 <tbody> | 194 <tbody> |
| 153 | 195 |
| 154 <tr> | 196 <tr> |
| 155 <th style='width:240px;'>Feature</th> | 197 <th style='width:240px;'>Feature</th> |
| 156 <th style='width:240px;'>Snippet</th> | 198 <th style='width:240px;'>Snippet</th> |
| 157 <th style='width:240px;'>Description</th> | 199 <th style='width:240px;'>Description</th> |
| 158 <th style='width:240px;'>Documentation Link</th> | 200 <th style='width:240px;'>Documentation Link</th> |
| 159 <th style='width:240px;'>Notes</th> | 201 <th style='width:240px;'>Notes</th> |
| 160 </tr> | 202 </tr> |
| 161 | 203 |
| 162 <tr> | 204 <tr> |
| 163 <td>Aliases</td> | 205 <td>Aliases</td> |
| 164 <td><code>using <i>new_alias</i> = <i>typename</i></code></td> | 206 <td><code>using <i>new_alias</i> = <i>typename</i></code></td> |
| 165 <td>Allow parameterized typedefs</td> | 207 <td>Allow parameterized typedefs</td> |
| 166 <td><a href="http://en.cppreference.com/w/cpp/language/type_alias">Type alias (u sing syntax)</a></td> | 208 <td><a href="http://en.cppreference.com/w/cpp/language/type_alias">Type alias (u sing syntax)</a></td> |
| 167 <td></td> | 209 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /8dOAMzgR4ao">Discussion thread</a></td> |
| 168 </tr> | 210 </tr> |
| 169 | 211 |
| 170 <tr> | 212 <tr> |
| 171 <td>Alignment Features</td> | 213 <td>Alignment Features</td> |
| 172 <td> | 214 <td> |
| 173 <code>alignas</code> specifier, | 215 <code>alignas</code> specifier, |
| 174 <code>std::alignment_of<T></code>, | 216 <code>std::alignment_of<T></code>, |
| 175 <code>std::aligned_union<Size, ...Types></code> and | 217 <code>std::aligned_union<Size, ...Types></code> and |
| 176 <code>std::max_align_t</code></td> | 218 <code>std::max_align_t</code></td> |
| 177 <td>Object alignment</td> | 219 <td>Object alignment</td> |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 193 <td>Automatic Types</td> | 235 <td>Automatic Types</td> |
| 194 <td><code>auto</code></td> | 236 <td><code>auto</code></td> |
| 195 <td>Automatic type deduction</td> | 237 <td>Automatic type deduction</td> |
| 196 <td>TODO: documentation link</td> | 238 <td>TODO: documentation link</td> |
| 197 <td><a | 239 <td><a |
| 198 href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#auto">Goo gle | 240 href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#auto">Goo gle |
| 199 Style Guide on <code>auto</code></a></td> | 241 Style Guide on <code>auto</code></a></td> |
| 200 </tr> | 242 </tr> |
| 201 | 243 |
| 202 <tr> | 244 <tr> |
| 203 <td>Constant Expressions</td> | |
| 204 <td><code>constexpr</code></td> | |
| 205 <td>Compile-time constant expressions</td> | |
| 206 <td>TODO: documentation link</td> | |
| 207 <td>Not supported in MSVS2013. <a | |
| 208 href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#constexpr ">Google | |
| 209 Style Guide on <code>constexpr</code></a></td> | |
| 210 </tr> | |
| 211 | |
| 212 <tr> | |
| 213 <td>Declared Type Accessor</td> | 245 <td>Declared Type Accessor</td> |
| 214 <td><code>decltype(<i>expression</i>)</code></td> | 246 <td><code>decltype(<i>expression</i>)</code></td> |
| 215 <td>Provides a means to determine the type of an expression at compile-time, | 247 <td>Provides a means to determine the type of an expression at compile-time, |
| 216 useful most often in templates.</td> | 248 useful most often in templates.</td> |
| 217 <td><a href="http://en.cppreference.com/w/cpp/language/decltype"> | 249 <td><a href="http://en.cppreference.com/w/cpp/language/decltype"> |
| 218 decltype specifier</a></td> | 250 decltype specifier</a></td> |
| 219 <td></td> | 251 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /_zoNvZd_dSo">Discussion thread</a></td> |
| 220 </tr> | 252 </tr> |
| 221 | 253 |
| 222 <tr> | 254 <tr> |
| 223 <td>Default Function Creation</td> | 255 <td>Default Function Creation</td> |
| 224 <td><code><i>Function</i>(<i>arguments</i>) = default;</code></td> | 256 <td><code><i>Function</i>(<i>arguments</i>) = default;</code></td> |
| 225 <td>Instructs the compiler to generate a default version | 257 <td>Instructs the compiler to generate a default version |
| 226 of the indicated function</td> | 258 of the indicated function</td> |
| 227 <td><a href="http://stackoverflow.com/questions/823935/whats-the-point-in-defaul ting-functions-in-c11"> | 259 <td><a href="http://stackoverflow.com/questions/823935/whats-the-point-in-defaul ting-functions-in-c11"> |
| 228 What's the point in defaulting functions in C++11?</a></td> | 260 What's the point in defaulting functions in C++11?</a></td> |
| 229 <td></td> | 261 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /qgU4mh_MpGA">Discussion thread</a></td> |
| 230 </tr> | 262 </tr> |
| 231 | 263 |
| 232 <tr> | 264 <tr> |
| 233 <td>Default Function Template Arguments</td> | 265 <td>Default Function Template Arguments</td> |
| 234 <td><code>template <typename T = <i>type</i>> <br /> | 266 <td><code>template <typename T = <i>type</i>> <br /> |
| 235 <i>type</i> <i>Function</i>(T <i>var</i>) {}</code></td> | 267 <i>type</i> <i>Function</i>(T <i>var</i>) {}</code></td> |
| 236 <td>Allow function templates, like classes, to have default arguments</td> | 268 <td>Allow function templates, like classes, to have default arguments</td> |
| 237 <td><a href="http://stackoverflow.com/questions/2447458/default-template-argumen ts-for-function-templates"> | 269 <td><a href="http://stackoverflow.com/questions/2447458/default-template-argumen ts-for-function-templates"> |
| 238 Default Template Arguments for Function Templates</a></td> | 270 Default Template Arguments for Function Templates</a></td> |
| 239 <td></td> | 271 <td></td> |
| 240 </tr> | 272 </tr> |
| 241 | 273 |
| 242 <tr> | 274 <tr> |
| 243 <td>Delegated Constructors</td> | 275 <td>Delegated Constructors</td> |
| 244 <td><code>Class() : Class(0) {}</code><br /> | 276 <td><code>Class() : Class(0) {}</code><br /> |
| 245 <code>Class(<i>type</i> <i>var</i>) : Class(<i>var</i>, 0)</code></td> | 277 <code>Class(<i>type</i> <i>var</i>) : Class(<i>var</i>, 0)</code></td> |
| 246 <td>Allow overloaded constructors to use common initialization code</td> | 278 <td>Allow overloaded constructors to use common initialization code</td> |
| 247 <td><a href="https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4b c0-81c5-3956e82276f3/entry/introduction_to_the_c_11_feature_delegating_construct ors?lang=en"> | 279 <td><a href="https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4b c0-81c5-3956e82276f3/entry/introduction_to_the_c_11_feature_delegating_construct ors?lang=en"> |
| 248 Introduction to the C++11 feature: delegating constructors</a></td> | 280 Introduction to the C++11 feature: delegating constructors</a></td> |
| 249 <td></td> | 281 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /0zVA8Ctx3Xo">Discussion thread</a></td> |
| 250 </tr> | 282 </tr> |
| 251 | 283 |
| 252 <tr> | 284 <tr> |
| 253 <td>Enumerated Type Classes</td> | 285 <td>Enumerated Type Classes</td> |
| 254 <td><code>enum class <i>classname</i></code></td> | 286 <td><code>enum class <i>classname</i></code></td> |
| 255 <td>Provide enums as full classes, with no implicit | 287 <td>Provide enums as full classes, with no implicit |
| 256 conversion to booleans or integers</td> | 288 conversion to booleans or integers</td> |
| 257 <td><a href="http://stackoverflow.com/questions/6936030/do-we-really-need-enum-c lass-in-c11"> | 289 <td><a href="http://stackoverflow.com/questions/6936030/do-we-really-need-enum-c lass-in-c11"> |
| 258 enum-class</a></td> | 290 enum-class</a></td> |
| 259 <td></td> | 291 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /Q5WmkAImanc">Discussion thread</a></td> |
| 260 </tr> | 292 </tr> |
| 261 | 293 |
| 262 <tr> | 294 <tr> |
| 263 <td>Exception Features</td> | 295 <td>Exception Features</td> |
| 264 <td><code>noexcept</code>, <code>exception_ptr</code>, | 296 <td><code>noexcept</code>, <code>exception_ptr</code>, |
| 265 <code>current_exception()</code>, <code>rethrow_exception</code>, | 297 <code>current_exception()</code>, <code>rethrow_exception</code>, |
| 266 and <code>nested_exception</code></td> | 298 and <code>nested_exception</code></td> |
| 267 <td>Enhancements to exception throwing and handling</td> | 299 <td>Enhancements to exception throwing and handling</td> |
| 268 <td><a href="http://en.cppreference.com/w/cpp/error/exception"> | 300 <td><a href="http://en.cppreference.com/w/cpp/error/exception"> |
| 269 std::exception</a></td> | 301 std::exception</a></td> |
| 270 <td>Exceptions are banned by the | 302 <td>Exceptions are banned by the |
| 271 <a href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Except ions"> | 303 <a href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Except ions"> C++ Style Guide</a>. <a href="https://groups.google.com/a/chromium.org/fo rum/#!topic/chromium-dev/8i4tMqNpHhg">Discussion thread</a></td> |
| 272 C++ Style Guide</a>.</td> | |
| 273 </tr> | 304 </tr> |
| 274 | 305 |
| 275 <tr> | 306 <tr> |
| 276 <td>Explicit Conversion Operators</td> | 307 <td>Explicit Conversion Operators</td> |
| 277 <td><code>explicit operator <i>type</i>() { | 308 <td><code>explicit operator <i>type</i>() { |
| 278 <br /> // code<br /> }</code></td> | 309 <br /> // code<br /> }</code></td> |
| 279 <td>Allows conversion operators that cannot be implicitly invoked</td> | 310 <td>Allows conversion operators that cannot be implicitly invoked</td> |
| 280 <td><a href="http://en.cppreference.com/w/cpp/language/explicit"> | 311 <td><a href="http://en.cppreference.com/w/cpp/language/explicit"> |
| 281 explicit specifier</a></td> | 312 explicit specifier</a></td> |
| 282 <td></td> | 313 <td></td> |
| 283 </tr> | 314 </tr> |
| 284 | 315 |
| 285 <tr> | 316 <tr> |
| 286 <td>Function Local Variable</td> | |
| 287 <td><code>__func__</code></td> | |
| 288 <td>Provides a local variable of the name of the enclosing | |
| 289 function for logging purposes</td> | |
| 290 <td><a href="http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum= 338"> | |
| 291 The __func__ Predeclared Identifier is Coming to C++</a></td> | |
| 292 <td></td> | |
| 293 </tr> | |
| 294 | |
| 295 <tr> | |
| 296 <td>Function Suppression</td> | 317 <td>Function Suppression</td> |
| 297 <td><code><i>Function</i>(<i>arguments</i>) = delete;</code></td> | 318 <td><code><i>Function</i>(<i>arguments</i>) = delete;</code></td> |
| 298 <td>Suppresses the implementation of a function, especially a | 319 <td>Suppresses the implementation of a function, especially a |
| 299 synthetic function such as a copy constructor</td> | 320 synthetic function such as a copy constructor</td> |
| 300 <td>TODO: documentation link</td> | 321 <td>TODO: documentation link</td> |
| 301 <td></td> | 322 <td></td> |
| 302 </tr> | 323 </tr> |
| 303 | 324 |
| 304 <tr> | 325 <tr> |
| 305 <td>(Uniform) Initialization Syntax</td> | 326 <td>(Uniform) Initialization Syntax</td> |
| 306 <td><code><i>type</i> <i>name</i> { [<i>value</i> ..., <i>value</i>]};</code></t d> | 327 <td><code><i>type</i> <i>name</i> { [<i>value</i> ..., <i>value</i>]};</code></t d> |
| 307 <td>Allows any object of primitive, aggregate or class | 328 <td>Allows any object of primitive, aggregate or class |
| 308 type to be initialized using brace syntax</td> | 329 type to be initialized using brace syntax</td> |
| 309 <td>TODO: documentation link</td> | 330 <td>TODO: documentation link</td> |
| 310 <td></td> | 331 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /GF96FshwHLw">Discussion thread</a></td> |
| 311 </tr> | 332 </tr> |
| 312 | 333 |
| 313 <tr> | 334 <tr> |
| 314 <td>Inline Namespaces</td> | 335 <td>Inline Namespaces</td> |
| 315 <td><code>inline</code></td> | 336 <td><code>inline</code></td> |
| 316 <td>Allows better versioning of namespaces</td> | 337 <td>Allows better versioning of namespaces</td> |
| 317 <td><a href="http://en.cppreference.com/w/cpp/language/namespace">Namespaces</a> </td> | 338 <td><a href="http://en.cppreference.com/w/cpp/language/namespace">Namespaces</a> </td> |
| 318 <td>Under investigation, unclear how it will work with | 339 <td>Under investigation, unclear how it will work with |
| 319 components</td> | 340 components</td> |
| 320 </tr> | 341 </tr> |
| 321 | 342 |
| 322 <tr> | 343 <tr> |
| 323 <td>Lambda Expressions</td> | 344 <td>Lambda Expressions</td> |
| 324 <td><code>[<i>captures</i>](<i>params</i>) -> <i>ret</i> { <i>body</i> }</cod e></td> | 345 <td><code>[<i>captures</i>](<i>params</i>) -> <i>ret</i> { <i>body</i> }</cod e></td> |
| 325 <td>Anonymous functions</td> | 346 <td>Anonymous functions</td> |
| 326 <td><a href="http://en.cppreference.com/w/cpp/language/lambda">Lambda functions< /a></td> | 347 <td><a href="http://en.cppreference.com/w/cpp/language/lambda">Lambda functions< /a></td> |
| 327 <td>No default captures (<a href="https://google-styleguide.googlecode.com/svn/t runk/cppguide.html#Lambda_expressions">Google Style Guide</a>).</td> | 348 <td>No default captures (<a href="https://google-styleguide.googlecode.com/svn/t runk/cppguide.html#Lambda_expressions">Google Style Guide</a>). <a href="https:/ /groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/D9UnnxBnciQ">Discus sion thread</a></td> |
| 328 </tr> | 349 </tr> |
| 329 | 350 |
| 330 <tr> | 351 <tr> |
| 331 <td><code>long long</code> Type</td> | 352 <td><code>long long</code> Type</td> |
| 332 <td><code>long long <i>var</i>= <i>value</i>;</code></td> | 353 <td><code>long long <i>var</i>= <i>value</i>;</code></td> |
| 333 <td>An integer of at least 64 bits</td> | 354 <td>An integer of at least 64 bits</td> |
| 334 <td><a href="http://en.cppreference.com/w/cpp/language/types"> | 355 <td><a href="http://en.cppreference.com/w/cpp/language/types"> |
| 335 Fundamental types</a></td> | 356 Fundamental types</a></td> |
| 336 <td></td> | 357 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /RxugZ-pIDxk">Discussion thread</a></td> |
| 337 </tr> | 358 </tr> |
| 338 | 359 |
| 339 <tr> | 360 <tr> |
| 340 <td>Non-Static Class Member Initializers</td> | 361 <td>Non-Static Class Member Initializers</td> |
| 341 <td> | 362 <td> |
| 342 <code> | 363 <code> |
| 343 class C {<br /> | 364 class C {<br /> |
| 344 <i>type</i> <i>var</i> = <i>value</i>;<br/> | 365 <i>type</i> <i>var</i> = <i>value</i>;<br/> |
| 345 C() // copy-initializes <i>var</i><br/> | 366 C() // copy-initializes <i>var</i><br/> |
| 346 </code> | 367 </code> |
| 347 <td>Allows non-static class members to be initialized at their definitions (outs ide constructors)</td> | 368 <td>Allows non-static class members to be initialized at their definitions (outs ide constructors)</td> |
| 348 <td><a href="http://en.cppreference.com/w/cpp/language/data_members"> | 369 <td><a href="http://en.cppreference.com/w/cpp/language/data_members"> |
| 349 Non-static data members</a></td> | 370 Non-static data members</a></td> |
| 350 <td></td> | 371 <td></td> |
| 351 </tr> | 372 </tr> |
| 352 | 373 |
| 353 <tr> | 374 <tr> |
| 354 <td>Range-Based For Loops</td> | 375 <td>Range-Based For Loops</td> |
| 355 <td><code>for (<i>type</i> <i>var</i> : <i>range</i>)</code></td> | 376 <td><code>for (<i>type</i> <i>var</i> : <i>range</i>)</code></td> |
| 356 <td>Facilitates a more concise syntax for iterating over the elements | 377 <td>Facilitates a more concise syntax for iterating over the elements |
| 357 of a container (or a range of iterators) in a <code>for</code> loop</td> | 378 of a container (or a range of iterators) in a <code>for</code> loop</td> |
| 358 <td>TODO: documentation link</td> | 379 <td>TODO: documentation link</td> |
| 359 <td></td> | 380 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /hpzz4EqbVmc">Discussion thread</a></td> |
| 360 </tr> | 381 </tr> |
| 361 | 382 |
| 362 <tr> | 383 <tr> |
| 363 <td>Raw String Literals</td> | 384 <td>Raw String Literals</td> |
| 364 <td><code>string <i>var</i>=R"(<i>raw_string</i>)";</code></td> | 385 <td><code>string <i>var</i>=R"(<i>raw_string</i>)";</code></td> |
| 365 <td>Allows a string to be encoded without any escape | 386 <td>Allows a string to be encoded without any escape |
| 366 sequences, easing parsing in regex expressions, for example</td> | 387 sequences, easing parsing in regex expressions, for example</td> |
| 367 <td>TODO: documentation link</td> | 388 <td>TODO: documentation link</td> |
| 368 <td></td> | 389 <td></td> |
| 369 </tr> | 390 </tr> |
| 370 | 391 |
| 371 <tr> | 392 <tr> |
| 372 <td>Rvalue References (and Move Semantics)</td> | 393 <td>Rvalue References (and Move Semantics)</td> |
| 373 <td><code>T(T&& t)</code> and <code>T& operator=(T&& t)</cod e></td> | 394 <td><code>T(T&& t)</code> and <code>T& operator=(T&& t)</cod e></td> |
| 374 <td>Reference that only binds to a temporary object</td> | 395 <td>Reference that only binds to a temporary object</td> |
| 375 <td>TODO: documentation link</td> | 396 <td>TODO: documentation link</td> |
| 376 <td></td> | 397 <td></td> |
| 377 </tr> | 398 </tr> |
| 378 | 399 |
| 379 <tr> | 400 <tr> |
| 380 <td>Static Assertions</td> | 401 <td>Static Assertions</td> |
| 381 <td><code>static_assert(<i>bool</i>, <i>string</i>)</code></td> | 402 <td><code>static_assert(<i>bool</i>, <i>string</i>)</code></td> |
| 382 <td>Tests compile-time conditions</td> | 403 <td>Tests compile-time conditions</td> |
| 383 <td><a href="http://en.cppreference.com/w/cpp/language/static_assert">Static Ass ertion</a></td> | 404 <td><a href="http://en.cppreference.com/w/cpp/language/static_assert">Static Ass ertion</a></td> |
| 384 <td></td> | 405 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /POISBQEhGzU">Discussion thread</a></td> |
| 385 </tr> | 406 </tr> |
| 386 | 407 |
| 387 <tr> | 408 <tr> |
| 388 <td>Union Class Members</td> | 409 <td>Union Class Members</td> |
| 389 <td><code>union <i>name</i> { <i>class</i> <i>var</i>}</code></td> | 410 <td><code>union <i>name</i> { <i>class</i> <i>var</i>}</code></td> |
| 390 <td>Allows class type members</td> | 411 <td>Allows class type members</td> |
| 391 <td><a href="http://en.cppreference.com/w/cpp/language/union"> | 412 <td><a href="http://en.cppreference.com/w/cpp/language/union"> |
| 392 Union declarations</a></td> | 413 Union declarations</a></td> |
| 393 <td></td> | 414 <td></td> |
| 394 </tr> | 415 </tr> |
| 395 | 416 |
| 396 <tr> | 417 <tr> |
| 397 <td>User-Defined Literals</td> | 418 <td>User-Defined Literals</td> |
| 398 <td><code><i>type</i> <i>var</i> = <i>literal_value</i>_<i>type</i></code></td> | 419 <td><code><i>type</i> <i>var</i> = <i>literal_value</i>_<i>type</i></code></td> |
| 399 <td>Allows user-defined literal expressions</td> | 420 <td>Allows user-defined literal expressions</td> |
| 400 <td>TODO: documentation link</td> | 421 <td>TODO: documentation link</td> |
| 401 <td></td> | 422 <td></td> |
| 402 </tr> | 423 </tr> |
| 403 | 424 |
| 404 <tr> | 425 <tr> |
| 405 <td>UTF-8 String Literals</td> | |
| 406 <td><code>u8"<i>string</i>"</code></td> | |
| 407 <td>Enforces UTF-8 encoding on all string literals</td> | |
| 408 <td><a href="http://en.cppreference.com/w/cpp/language/string_literal"> | |
| 409 string literal</a></td> | |
| 410 <td></td> | |
| 411 </tr> | |
| 412 | |
| 413 <tr> | |
| 414 <td>UTF-16 and UTF-32 Support (16-Bit and 32-Bit Character Types)</td> | |
| 415 <td><code>char16_t</code> and <code>char32_t</code></td> | |
| 416 <td>Provides character types for handling 16-bit | |
| 417 and 32-bit code units (useful for encoding | |
| 418 UTF-16 and UTF-32 string data)</td> | |
| 419 <td><a href="http://en.cppreference.com/w/cpp/language/types"> | |
| 420 Fundamental types</a></td> | |
| 421 <td>Non-UTF-8 text is banned by the | |
| 422 <a href="https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Non-AS CII_Characters"> | |
| 423 C++ Style Guide</a>. However, may be useful for | |
| 424 consuming non-ASCII data.</td> | |
| 425 </tr> | |
| 426 | |
| 427 | |
| 428 <tr> | |
| 429 <td>Variadic Macros</td> | 426 <td>Variadic Macros</td> |
| 430 <td><code>#define <i>MACRO</i>(...) <i>Impl</i>(<i>args</i>, __VA_ARGS__)</code> </td> | 427 <td><code>#define <i>MACRO</i>(...) <i>Impl</i>(<i>args</i>, __VA_ARGS__)</code> </td> |
| 431 <td>Allows macros that accept a variable number of arguments</td> | 428 <td>Allows macros that accept a variable number of arguments</td> |
| 432 <td><a href="http://stackoverflow.com/questions/4786649/are-variadic-macros-nons tandard"> | 429 <td><a href="http://stackoverflow.com/questions/4786649/are-variadic-macros-nons tandard"> |
| 433 Are Variadic macros nonstandard?</a></td> | 430 Are Variadic macros nonstandard?</a></td> |
| 434 <td></td> | 431 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /sRx9j3CQqyA">Discussion thread</a></td> |
| 435 </tr> | 432 </tr> |
| 436 | 433 |
| 437 <tr> | 434 <tr> |
| 438 <td>Variadic Templates</td> | 435 <td>Variadic Templates</td> |
| 439 <td><code>template <<i>typename</i> ... <i>arg</i>></code></td> | 436 <td><code>template <<i>typename</i> ... <i>arg</i>></code></td> |
| 440 <td>Allows templates that accept a variable number of arguments</td> | 437 <td>Allows templates that accept a variable number of arguments</td> |
| 441 <td>TODO: documentation link</td> | 438 <td>TODO: documentation link</td> |
| 442 <td></td> | 439 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /6ItymeMXpMc">Discussion thread</a></td> |
| 443 </tr> | 440 </tr> |
| 444 | 441 |
| 445 </tbody> | 442 </tbody> |
| 446 </table> | 443 </table> |
| 447 | 444 |
| 448 <h3 id="blacklist_stdlib">C++11 Standard Library features</h3> | 445 <h3 id="blacklist_stdlib">C++11 Standard Library features</h3> |
| 449 | 446 |
| 450 <details> | 447 <details> |
| 451 | 448 |
| 452 <p><summary class="note">All C++11 <strong>Standard Library features are current ly | 449 <p><summary class="note">All C++11 <strong>Standard Library features are current ly |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 822 <td><a href="http://en.cppreference.com/w/cpp/error/system_error">std::system_er ror</a></td> | 819 <td><a href="http://en.cppreference.com/w/cpp/error/system_error">std::system_er ror</a></td> |
| 823 <td></td> | 820 <td></td> |
| 824 </tr> | 821 </tr> |
| 825 | 822 |
| 826 <tr> | 823 <tr> |
| 827 <td>Trailing Return Types</td> | 824 <td>Trailing Return Types</td> |
| 828 <td><code>auto <i>function declaration</i> -> <i>return_type</i></code></td> | 825 <td><code>auto <i>function declaration</i> -> <i>return_type</i></code></td> |
| 829 <td>Allows trailing function return value syntax</td> | 826 <td>Allows trailing function return value syntax</td> |
| 830 <td><a href="http://en.cppreference.com/w/cpp/language/function"> | 827 <td><a href="http://en.cppreference.com/w/cpp/language/function"> |
| 831 Declaring functions</a></td> | 828 Declaring functions</a></td> |
| 832 <td></td> | 829 <td><a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev /OQyYSfH9m2M">Discussion thread</a></td> |
| 833 </tr> | 830 </tr> |
| 834 | 831 |
| 835 <tr> | 832 <tr> |
| 836 <td>Thread Library</td> | 833 <td>Thread Library</td> |
| 837 <td><code><thread> support, including <future>, | 834 <td><code><thread> support, including <future>, |
| 838 <mutex>, <condition_variable></code></td> | 835 <mutex>, <condition_variable></code></td> |
| 839 <td>Provides a standard mulitthreading library using <code>std::thread</code> an d associates</td> | 836 <td>Provides a standard mulitthreading library using <code>std::thread</code> an d associates</td> |
| 840 <td><a href="http://en.cppreference.com/w/cpp/thread">Thread support library</a> </td> | 837 <td><a href="http://en.cppreference.com/w/cpp/thread">Thread support library</a> </td> |
| 841 <td></td> | 838 <td></td> |
| 842 </tr> | 839 </tr> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 945 </tr> | 942 </tr> |
| 946 | 943 |
| 947 </tbody> | 944 </tbody> |
| 948 </table> | 945 </table> |
| 949 | 946 |
| 950 </details> | 947 </details> |
| 951 | 948 |
| 952 </div> | 949 </div> |
| 953 </body> | 950 </body> |
| 954 </html> | 951 </html> |
| OLD | NEW |