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

Unified Diff: base/strings/string16.h

Issue 1467003002: Switch to static_assert in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: / Created 5 years, 1 month 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 | « base/strings/safe_sprintf.cc ('k') | base/sync_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string16.h
diff --git a/base/strings/string16.h b/base/strings/string16.h
index 1a01a9613e78dc67685d96a7269cd2569d7e9c2c..ba4ffe788a48ec10470c5417a862aa172e9c6f0a 100644
--- a/base/strings/string16.h
+++ b/base/strings/string16.h
@@ -64,7 +64,8 @@ struct string16_char_traits {
// int_type needs to be able to hold each possible value of char_type, and in
// addition, the distinct value of eof().
- COMPILE_ASSERT(sizeof(int_type) > sizeof(char_type), unexpected_type_width);
+ static_assert(sizeof(int_type) > sizeof(char_type),
+ "int must be larger than 16 bits wide");
typedef std::streamoff off_type;
typedef mbstate_t state_type;
« no previous file with comments | « base/strings/safe_sprintf.cc ('k') | base/sync_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698