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

Unified Diff: base/bind.h

Issue 1680643002: Refactor gmock_mutant.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | chrome/browser/speech/extension_api/tts_extension_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind.h
diff --git a/base/bind.h b/base/bind.h
index c6b73936a638229fc24b63e15435dcb7bf7c8258..3a20feb79116c3b95179d6bdd25fe5e7f859d41d 100644
--- a/base/bind.h
+++ b/base/bind.h
@@ -46,12 +46,26 @@
namespace base {
+namespace internal {
+
+// Don't use Alias Template directly here to avoid a compile error on MSVC2013.
+template <typename Functor, typename... Args>
+struct MakeUnboundRunTypeImpl {
+ using Type =
+ typename BindState<
+ typename FunctorTraits<Functor>::RunnableType,
+ typename FunctorTraits<Functor>::RunType,
+ typename std::decay<Args>::type...>::UnboundRunType;
+};
+
+} // namespace internal
+
+template <typename Functor, typename... Args>
+using MakeUnboundRunType =
+ typename internal::MakeUnboundRunTypeImpl<Functor, Args...>::Type;
+
template <typename Functor, typename... Args>
-base::Callback<
- typename internal::BindState<
- typename internal::FunctorTraits<Functor>::RunnableType,
- typename internal::FunctorTraits<Functor>::RunType,
- typename std::decay<Args>::type...>::UnboundRunType>
+base::Callback<MakeUnboundRunType<Functor, Args...>>
Bind(Functor functor, Args&&... args) {
// Type aliases for how to store and run the functor.
using RunnableType = typename internal::FunctorTraits<Functor>::RunnableType;
« no previous file with comments | « no previous file | chrome/browser/speech/extension_api/tts_extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698