Index: components/mus/public/cpp/window_property.h |
diff --git a/components/mus/public/cpp/window_property.h b/components/mus/public/cpp/window_property.h |
index cd5dd2b508a42c768f5f035326ddad0e61ddcafa..71f0749aa179c038f59257b8c2f587fe35050ce7 100644 |
--- a/components/mus/public/cpp/window_property.h |
+++ b/components/mus/public/cpp/window_property.h |
@@ -129,14 +129,16 @@ void Window::ClearLocalProperty(const WindowProperty<T>* property) { |
DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(, T) |
#define DEFINE_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ |
- COMPILE_ASSERT(sizeof(TYPE) <= sizeof(int64_t), property_type_too_large); \ |
+ static_assert(sizeof(TYPE) <= sizeof(int64_t), \ |
+ "Property type must fit in 64 bits"); \ |
namespace { \ |
const mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \ |
} \ |
const mus::WindowProperty<TYPE>* const NAME = &NAME##_Value; |
#define DEFINE_LOCAL_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ |
- COMPILE_ASSERT(sizeof(TYPE) <= sizeof(int64_t), property_type_too_large); \ |
+ static_assert(sizeof(TYPE) <= sizeof(int64_t), \ |
+ "Property type must fit in 64 bits"); \ |
namespace { \ |
const mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \ |
const mus::WindowProperty<TYPE>* const NAME = &NAME##_Value; \ |