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

Unified Diff: mojo/public/cpp/bindings/callback.h

Issue 1395533005: Use <type_traits> in the C++ bindings library wherever possible. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 | mojo/public/cpp/bindings/lib/array_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/callback.h
diff --git a/mojo/public/cpp/bindings/callback.h b/mojo/public/cpp/bindings/callback.h
index beec1a102e7024a44a33b51c20ba9da49e1ee4fe..0a06e76f36ac7a6d6dc1cbfbcd1d951e57d34bad 100644
--- a/mojo/public/cpp/bindings/callback.h
+++ b/mojo/public/cpp/bindings/callback.h
@@ -5,6 +5,8 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_CALLBACK_H_
#define MOJO_PUBLIC_CPP_BINDINGS_CALLBACK_H_
+#include <type_traits>
+
#include "mojo/public/cpp/bindings/lib/callback_internal.h"
#include "mojo/public/cpp/bindings/lib/shared_ptr.h"
#include "mojo/public/cpp/bindings/lib/template_util.h"
@@ -41,7 +43,7 @@ class Callback<void(Args...)> {
// preferred if the type has both.
template <typename Sink>
Callback(const Sink& sink) {
- using sink_type = typename internal::Conditional<
+ using sink_type = typename std::conditional<
internal::HasCompatibleCallOperator<Sink, Args...>::value,
FunctorAdapter<Sink>, RunnableAdapter<Sink>>::type;
sink_ = internal::SharedPtr<Runnable>(new sink_type(sink));
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/array_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698