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

Unified Diff: mojo/public/cpp/bindings/tests/callback_unittest.cc

Issue 1402523002: Allow implicitly converting a lambda to mojo::Callback using C++11 (Closed) Base URL: git@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 | « mojo/public/cpp/bindings/lib/callback_internal.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/callback_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/callback_unittest.cc b/mojo/public/cpp/bindings/tests/callback_unittest.cc
index 158b21e512c9e9e81ac090e3f49843d784f8797c..a423090296366ab061d07040cec0fd7fb066248a 100644
--- a/mojo/public/cpp/bindings/tests/callback_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/callback_unittest.cc
@@ -62,37 +62,6 @@ void FunctionMoveOnlyType(ExampleMoveOnlyType m) {
(*g_calls)++;
}
-static_assert(!internal::HasCompatibleCallOperator<RunnableNoArgs>::value,
- "HasCompatibleCallOperator<Runnable>");
-static_assert(!internal::HasCompatibleCallOperator<RunnableOneArg, int>::value,
- "HasCompatibleCallOperator<RunnableOneArg, int>");
-static_assert(!internal::HasCompatibleCallOperator<RunnableStringArgByConstRef,
- String>::value,
- "HasCompatibleCallOperator<RunnableStringArgByConstRef, String>");
-static_assert(!internal::HasCompatibleCallOperator<RunnableMoveOnlyParam,
- ExampleMoveOnlyType>::value,
- "HasCompatibleCallOperator<RunnableMoveOnlyParam, String>");
-
-auto lambda_one = []() {};
-static_assert(internal::HasCompatibleCallOperator<decltype(lambda_one)>::value,
- "HasCompatibleCallOperator<lambda []() {}>");
-
-auto lambda_two = [](int x) {};
-static_assert(
- internal::HasCompatibleCallOperator<decltype(lambda_two), int>::value,
- "HasCompatibleCallOperator<lambda [](int x) {}, int>");
-
-auto lambda_three = [](const String& s) {};
-static_assert(
- internal::HasCompatibleCallOperator<decltype(lambda_three), String>::value,
- "HasCompatibleCallOperator<lambda [](const String& s) {}, String>");
-
-auto lambda_four = [](ExampleMoveOnlyType m) {};
-static_assert(internal::HasCompatibleCallOperator<decltype(lambda_four),
- ExampleMoveOnlyType>::value,
- "HasCompatibleCallOperator<lambda [](ExampleMoveOnlyType) {}, "
- "ExampleMoveOnlyType>");
-
// Tests constructing and invoking a mojo::Callback from objects with a
// compatible Run() method (called 'runnables'), from lambdas, and from function
// pointers.
« no previous file with comments | « mojo/public/cpp/bindings/lib/callback_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698