Rewrite rtc::Bind using variadic templates.
I'd like to make a change to rtc::Bind in another CL, and that will
be easier if there are fewer lines of code to modify.
BUG=None
Review-Url: https://codereview.webrtc.org/2719683002
Cr-Commit-Position: refs/heads/master@{#16838}
diff --git a/webrtc/base/bind_unittest.cc b/webrtc/base/bind_unittest.cc
index be8d79c..3331591 100644
--- a/webrtc/base/bind_unittest.cc
+++ b/webrtc/base/bind_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <type_traits>
+
#include "webrtc/base/bind.h"
#include "webrtc/base/gunit.h"
@@ -71,26 +73,6 @@
// Try to catch any problem with scoped_refptr type deduction in rtc::Bind at
// compile time.
-static_assert(
- is_same<
- rtc::remove_reference<const scoped_refptr<RefCountInterface>&>::type,
- const scoped_refptr<RefCountInterface>>::value,
- "const scoped_refptr& should be captured by value");
-
-static_assert(is_same<rtc::remove_reference<const scoped_refptr<F>&>::type,
- const scoped_refptr<F>>::value,
- "const scoped_refptr& should be captured by value");
-
-static_assert(
- is_same<rtc::remove_reference<const int&>::type, const int>::value,
- "const int& should be captured as const int");
-
-static_assert(is_same<rtc::remove_reference<const F&>::type, const F>::value,
- "const F& should be captured as const F");
-
-static_assert(is_same<rtc::remove_reference<F&>::type, F>::value,
- "F& should be captured as F");
-
#define EXPECT_IS_CAPTURED_AS_PTR(T) \
static_assert(is_same<detail::PointerType<T>::type, T*>::value, \
"PointerType")