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

Unified Diff: util/numeric/checked_range.h

Issue 615923004: Convert COMPILE_ASSERT to static_assert (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 6 years, 3 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 | « util/misc/uuid.cc ('k') | util/numeric/int128.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/numeric/checked_range.h
diff --git a/util/numeric/checked_range.h b/util/numeric/checked_range.h
index b0f122278a0b0cde25233ff3e49333f0ac3f2bc1..df3e395fe2be334ae5615d86ff4eb3d2ee9b0046 100644
--- a/util/numeric/checked_range.h
+++ b/util/numeric/checked_range.h
@@ -30,8 +30,8 @@ template <typename ValueType, typename SizeType = ValueType>
class CheckedRange {
public:
CheckedRange(ValueType base, SizeType size) {
- COMPILE_ASSERT(!std::numeric_limits<SizeType>::is_signed,
- SizeType_must_be_unsigned);
+ static_assert(!std::numeric_limits<SizeType>::is_signed,
+ "SizeType must be unsigned");
SetRange(base, size);
}
« no previous file with comments | « util/misc/uuid.cc ('k') | util/numeric/int128.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698