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

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

Issue 1506943002: style: Allow std::move, the std::copy counterpart. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 <tr> 353 <tr>
354 <td>Move Semantics</td> 354 <td>Move Semantics</td>
355 <td><code>std::move()</code></td> 355 <td><code>std::move()</code></td>
356 <td>Facilitates efficient move operations</td> 356 <td>Facilitates efficient move operations</td>
357 <td><a href="http://en.cppreference.com/w/cpp/utility/move"><code>std::move</cod e> reference</a></td> 357 <td><a href="http://en.cppreference.com/w/cpp/utility/move"><code>std::move</cod e> reference</a></td>
358 <td>Note: std::move() is allowed but writing your own move constructors is still only allowed in exceptional cases for now, see 'Rvalue References (and Move Sem antics)'. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/x_ dWFxJFdbM'>Discussion thread</a></td> 358 <td>Note: std::move() is allowed but writing your own move constructors is still only allowed in exceptional cases for now, see 'Rvalue References (and Move Sem antics)'. <a href='https://groups.google.com/a/chromium.org/forum/#!topic/cxx/x_ dWFxJFdbM'>Discussion thread</a></td>
359 </tr> 359 </tr>
360 360
361 <tr> 361 <tr>
362 <td>Range Move</td>
363 <td><code>std::move()</code></td>
364 <td>Moves contents of an iterator range to a different iterator. This is a count erpart of std::copy that applies std::move() to each element.</td>
365 <td><a href="http://en.cppreference.com/w/cpp/algorithm/move"><code>std::move</c ode> reference</a></td>
366 <td>This is allowed, but there is almost always a way to write code without usin g this version of std::move. Not using it usually results in cleaner, easier to read, and less confusing code. <a href='https://groups.google.com/a/chromium.org /forum/#!topic/cxx/8WzmtYrZvQ8'>Discussion thread</a></td>
367 </tr>
368
369 <tr>
362 <td>Type Traits</td> 370 <td>Type Traits</td>
363 <td>Class templates within <code>&lt;type_traits&gt;</code></td> 371 <td>Class templates within <code>&lt;type_traits&gt;</code></td>
364 <td>Allows compile-time inspection of the properties of types</td> 372 <td>Allows compile-time inspection of the properties of types</td>
365 <td><a href="http://en.cppreference.com/w/cpp/header/type_traits"> 373 <td><a href="http://en.cppreference.com/w/cpp/header/type_traits">
366 Standard library header &lt;type_traits&gt;</a></td> 374 Standard library header &lt;type_traits&gt;</a></td>
367 <td>Note that not all type traits are available on all platforms (eg std::underl ying_type doesn't work in libstdc++4.6). Use judiciously. <a href='https://group s.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discussion thread</a> </td> 375 <td>Note that not all type traits are available on all platforms (eg std::underl ying_type doesn't work in libstdc++4.6). Use judiciously. <a href='https://group s.google.com/a/chromium.org/forum/#!topic/cxx/vCxo4tZNd_M'>Discussion thread</a> </td>
368 </tr> 376 </tr>
369 377
370 <tr> 378 <tr>
371 <td>Types, functions, and constants from <code>&lt;cmath&gt;</code></td> 379 <td>Types, functions, and constants from <code>&lt;cmath&gt;</code></td>
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 C++ Style Guide</a>. However, may be useful for 1071 C++ Style Guide</a>. However, may be useful for
1064 consuming non-ASCII data.</td> 1072 consuming non-ASCII data.</td>
1065 </tr> 1073 </tr>
1066 1074
1067 </tbody> 1075 </tbody>
1068 </table> 1076 </table>
1069 1077
1070 </div> 1078 </div>
1071 </body> 1079 </body>
1072 </html> 1080 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698