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

Unified Diff: base/template_util_unittest.cc

Issue 598223003: Update base::is_member_function_pointer to use variadic templates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment 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 | « base/template_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/template_util_unittest.cc
diff --git a/base/template_util_unittest.cc b/base/template_util_unittest.cc
index 98ad9389122a0fc19c4e4c4aaa0d8e9687705043..3ec3887154d89a4fd99033e9d5ca2bd77a2111ae 100644
--- a/base/template_util_unittest.cc
+++ b/base/template_util_unittest.cc
@@ -87,6 +87,8 @@ COMPILE_ASSERT(!is_member_function_pointer<AStruct>::value,
IsMemberFunctionPointer);
COMPILE_ASSERT(!is_member_function_pointer<AStruct*>::value,
IsMemberFunctionPointer);
+COMPILE_ASSERT(!is_member_function_pointer<void(*)()>::value,
+ IsMemberFunctionPointer);
COMPILE_ASSERT(!is_member_function_pointer<int(*)(int)>::value,
IsMemberFunctionPointer);
COMPILE_ASSERT(!is_member_function_pointer<int(*)(int, int)>::value,
@@ -102,29 +104,6 @@ COMPILE_ASSERT(is_member_function_pointer<int (AStruct::*)(int) const>::value,
IsMemberFunctionPointer);
COMPILE_ASSERT(is_member_function_pointer<int (AStruct::*)(int, int)>::value,
IsMemberFunctionPointer);
-COMPILE_ASSERT(is_member_function_pointer<
- int (AStruct::*)(int, int) const>::value,
- IsMemberFunctionPointer);
-COMPILE_ASSERT(is_member_function_pointer<
- int (AStruct::*)(int, int, int)>::value,
- IsMemberFunctionPointer);
-COMPILE_ASSERT(is_member_function_pointer<
- int (AStruct::*)(int, int, int) const>::value,
- IsMemberFunctionPointer);
-COMPILE_ASSERT(is_member_function_pointer<
- int (AStruct::*)(int, int, int, int)>::value,
- IsMemberFunctionPointer);
-COMPILE_ASSERT(is_member_function_pointer<
- int (AStruct::*)(int, int, int, int) const>::value,
- IsMemberFunctionPointer);
-
-// False because we don't have a specialization for 5 params yet.
-COMPILE_ASSERT(!is_member_function_pointer<
- int (AStruct::*)(int, int, int, int, int)>::value,
- IsMemberFunctionPointer);
-COMPILE_ASSERT(!is_member_function_pointer<
- int (AStruct::*)(int, int, int, int, int) const>::value,
- IsMemberFunctionPointer);
Nico 2014/09/25 22:19:11 maybe keep this one (without "!")
Aaron Boodman 2014/09/25 22:34:41 But there's no reason now based on how this works
} // namespace
} // namespace base
« no previous file with comments | « base/template_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698