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

Unified Diff: src/parsing/token.cc

Issue 2731263003: Allow constexpr function in MSVC (Closed)
Patch Set: drop globals.h Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/token.cc
diff --git a/src/parsing/token.cc b/src/parsing/token.cc
index 35038ba766d67d352b4d8d67a59ca01d676c6129..c9a5b7e885ff94ae59413b2c94b2893de112dfc2 100644
--- a/src/parsing/token.cc
+++ b/src/parsing/token.cc
@@ -22,11 +22,7 @@ const char* const Token::string_[NUM_TOKENS] = {
};
#undef T
-#if !V8_CC_MSVC
-// TODO(vogelheim): Remove #if once MSVC supports constexpr on functions.
-constexpr
-#endif
-uint8_t length(const char* str) {
+constexpr uint8_t length(const char* str) {
return str ? static_cast<uint8_t>(strlen(str)) : 0;
}
#define T(name, string, precedence) length(string),
« 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