Skip to content

Commit 9d92a1d

Browse files
danakjCommit bot
authored and
Commit bot
committed
Add ref-qualified member functions as undiscussed in the C++11 guide.
R=thakis@chromium.org BUG=554287 Review URL: https://codereview.chromium.org/1431423002 Cr-Commit-Position: refs/heads/master@{#358983}
1 parent 73a78b0 commit 9d92a1d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

styleguide/c++/c++11.html

+9
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,15 @@ <h3 id="blacklist_review">C++11 Features To Be Discussed</h3>
526526
<td>Unclear how it will work with components</td>
527527
</tr>
528528

529+
<tr>
530+
<td>Ref-qualified Member Functions</td>
531+
<td><code>class T {<br/>&nbsp;&nbsp;void f() & {}<br/>&nbsp;&nbsp;void f() && {}<br/>};<br/>t.f(); // first<br/>T().f(); // second<br/>std::move(t).f(); // second</code></td>
532+
<td>Allows class member functions to only bind to |this| as an rvalue or lvalue.</td>
533+
<td><a href="http://en.cppreference.com/w/cpp/language/member_functions">
534+
Member functions</a></td>
535+
<td>Banned in the google3 C++11 library style guide, but being considered for use in bind/callback in google3 and the standard library.</td>
536+
</tr>
537+
529538
<tr>
530539
<td>Union Class Members</td>
531540
<td><code>union <i>name</i> { <i>class</i> <i>var</i>}</code></td>

0 commit comments

Comments
 (0)