Index: base/task_scheduler/task_traits.cc |
diff --git a/base/task_scheduler/task_traits.cc b/base/task_scheduler/task_traits.cc |
index ad0e37f887166009b9608cf680a90d505e276f45..d8904493cc4271a09618440b806d18e4be173079 100644 |
--- a/base/task_scheduler/task_traits.cc |
+++ b/base/task_scheduler/task_traits.cc |
@@ -4,6 +4,8 @@ |
#include "base/task_scheduler/task_traits.h" |
+#include <stddef.h> |
+ |
#include <ostream> |
namespace base { |
@@ -35,6 +37,10 @@ TaskTraits& TaskTraits::WithShutdownBehavior( |
} |
bool TaskTraits::operator==(const TaskTraits& other) const { |
+ static_assert(sizeof(TaskTraits) == |
+ offsetof(TaskTraits, shutdown_behavior_) + |
+ sizeof(TaskTraits::shutdown_behavior_), |
+ "TaskTraits members changed. Update operator==."); |
return with_file_io_ == other.with_file_io_ && priority_ == other.priority_ && |
shutdown_behavior_ == other.shutdown_behavior_; |
} |