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

Unified Diff: styleguide/c++/c++11.html

Issue 1878253003: Allow explicit conversion operators and implement WTF::OwnPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/InterpolationValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: styleguide/c++/c++11.html
diff --git a/styleguide/c++/c++11.html b/styleguide/c++/c++11.html
index 09ddfe0c471663f92f301f77854126fbff2461ce..8ba681ed80d5b47b8ded80d6cd731d967c100019 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -165,6 +165,16 @@ enum classes and regular enums.</td>
</tr>
<tr>
+<td>Explicit Conversion Operators</td>
+<td><code>explicit operator <i>type</i>() {
+<br />&nbsp;&nbsp;// code<br /> }</code></td>
+<td>Allows conversion operators that cannot be implicitly invoked</td>
+<td><a href="http://en.cppreference.com/w/cpp/language/explicit">
+explicit specifier</a></td>
+<td>Prefer to the "safe bool" idiom. <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-dev/zGF1SrQ-1HQ/BAiC12vwPeEJ">Discussion thread</a></td>
+</tr>
+
+<tr>
<td>Final Specifier</td>
<td><code>final</code></td>
<td> Indicates that a class or function is final and cannot be overridden</td>
@@ -551,16 +561,6 @@ Style Guide on <code>constexpr</code></a></td>
</tr>
<tr>
-<td>Explicit Conversion Operators</td>
-<td><code>explicit operator <i>type</i>() {
-<br />&nbsp;&nbsp;// code<br /> }</code></td>
-<td>Allows conversion operators that cannot be implicitly invoked</td>
-<td><a href="http://en.cppreference.com/w/cpp/language/explicit">
-explicit specifier</a></td>
-<td><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811334/bug-in-vs-2013-support-for-explicit-conversion-operators">Doesn't work in MSVS2013</a>. Reevaluate once it does. <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-dev/zGF1SrQ-1HQ/BAiC12vwPeEJ">Discussion thread</a></td>
-</tr>
-
-<tr>
<td>Function Local Variable</td>
<td><code>__func__</code></td>
<td>Provides a local variable of the name of the enclosing
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/InterpolationValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698