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

Unified Diff: util/misc/uuid.cc

Issue 440603002: Put back the standard-layout checks lost in 5bbb7e8abbe0 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 4 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.h ('k') | util/misc/uuid_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/misc/uuid.cc
diff --git a/util/misc/uuid.cc b/util/misc/uuid.cc
index a460550aae5a8e7f08cad0d11e5245e34c0d2d8f..1af79d83b7bfa87bd9a32135aa83cc3d253cd700 100644
--- a/util/misc/uuid.cc
+++ b/util/misc/uuid.cc
@@ -19,9 +19,21 @@
#include "base/basictypes.h"
#include "base/strings/stringprintf.h"
#include "base/sys_byteorder.h"
+#include "util/stdlib/cxx.h"
+
+#if CXX_LIBRARY_VERSION >= 2011
+#include <type_traits>
+#endif
namespace crashpad {
+COMPILE_ASSERT(sizeof(UUID) == 16, UUID_must_be_16_bytes);
+
+#if CXX_LIBRARY_VERSION >= 2011
+COMPILE_ASSERT(std::is_standard_layout<UUID>::value,
+ UUID_must_be_standard_layout);
+#endif
+
UUID::UUID() : data_1(0), data_2(0), data_3(0), data_4(), data_5() {
}
« no previous file with comments | « util/misc/uuid.h ('k') | util/misc/uuid_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698