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

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

Issue 1885183002: Allow constexpr, and use it in a few places. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add guidance 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 | « chrome/browser/themes/theme_properties.cc ('k') | ui/gfx/color_palette.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 8ba681ed80d5b47b8ded80d6cd731d967c100019..e592cb40de7847708c7dd04f0f75ad7164d2bb85 100644
--- a/styleguide/c++/c++11.html
+++ b/styleguide/c++/c++11.html
@@ -110,6 +110,14 @@ Style Guide on <code>auto</code></a>. <a href="https://groups.google.com/a/chrom
</tr>
<tr>
+<td>Constant Expressions</td>
+<td><code>constexpr</code></td>
+<td>Compile-time constant expressions</td>
+<td><a href="http://en.cppreference.com/w/cpp/language/constexpr">constexpr specifier</a></td>
+<td>Prefer to <code>const</code> for variables where possible. Use cautiously on functions. Don't go out of the way to convert existing code. <a href="https://google.github.io/styleguide/cppguide.html#Use_of_constexpr">Google Style Guide</a></td>
+</tr>
+
+<tr>
<td>Declared Type Accessor</td>
<td><code>decltype(<i>expression</i>)</code></td>
<td>Provides a means to determine the type of an expression at compile-time,
@@ -550,17 +558,6 @@ supports them</a>; reevaluate after MSVS2015 is available.
</tr>
<tr>
-<td>Constant Expressions</td>
-<td><code>constexpr</code></td>
-<td>Compile-time constant expressions</td>
-<td><a href="http://en.cppreference.com/w/cpp/language/constexpr">
-constexpr specifier</a></td>
-<td>Doesn't work in MSVS2013. Reevalute once it does. <a
-href="https://google.github.io/styleguide/cppguide.html#Use_of_constexpr">Google
-Style Guide on <code>constexpr</code></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 | « chrome/browser/themes/theme_properties.cc ('k') | ui/gfx/color_palette.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698