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

Unified Diff: base/observer_list_threadsafe.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/metrics/field_trial.cc ('k') | base/rand_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/observer_list_threadsafe.h
diff --git a/base/observer_list_threadsafe.h b/base/observer_list_threadsafe.h
index b9b4a624ca815da9efdf4d72423516b03f4637b6..e4204941949ff5996383b9906d916eca1322e85d 100644
--- a/base/observer_list_threadsafe.h
+++ b/base/observer_list_threadsafe.h
@@ -67,9 +67,8 @@ template <class T, class Method, class Params>
class UnboundMethod {
public:
UnboundMethod(Method m, const Params& p) : m_(m), p_(p) {
- COMPILE_ASSERT(
- (internal::ParamsUseScopedRefptrCorrectly<Params>::value),
- badunboundmethodparams);
+ static_assert((internal::ParamsUseScopedRefptrCorrectly<Params>::value),
+ "bad unbound method params");
}
void Run(T* obj) const {
DispatchToMethod(obj, m_, p_);
« no previous file with comments | « base/metrics/field_trial.cc ('k') | base/rand_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698