diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2020-03-26 15:47:04 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2020-04-14 19:06:27 +0200 |
commit | 786b48878f37edafd5eb928ed0f4d046ee1d6bec (patch) | |
tree | 7dffd263964b1375dd9814d4edcfc675d7489e84 /tests/auto/concurrent/qtconcurrentrun | |
parent | 678b9f78a5af4513ed4e988de90148584a2ae90d (diff) |
Improve Map|Map-Reduce and Filter|Filter-Reduce implementation
* support lambda expressions
* remove the need to specify result_type
* use std::invoke to apply map|filter function
* remove usage of FunctionWrapper* and createFunctionWrapper
Task-number: QTBUG-33735
Task-number: QTBUG-82646
Change-Id: Ibcbe4278f0742c29182bd506081db0abb516f85f
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'tests/auto/concurrent/qtconcurrentrun')
-rw-r--r-- | tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp index c0782d8483..8f50329ec5 100644 --- a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp +++ b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp @@ -104,7 +104,6 @@ public: int member0() { return 10; } int member1(int in) { return in; } - typedef int result_type; int operator()() { return 10; } int operator()(int in) { return in; } }; @@ -115,7 +114,6 @@ public: int member0() const { return 10; } int member1(int in) const { return in; } - typedef int result_type; int operator()() const { return 10; } int operator()(int in) const { return in; } }; @@ -126,7 +124,6 @@ public: int member0() noexcept { return 10; } int member1(int in) noexcept { return in; } - typedef int result_type; int operator()() noexcept { return 10; } int operator()(int in) noexcept { return in; } }; @@ -137,7 +134,6 @@ public: int member0() const noexcept { return 10; } int member1(int in) const noexcept { return in; } - typedef int result_type; int operator()() const noexcept { return 10; } int operator()(int in) const noexcept { return in; } }; @@ -320,7 +316,6 @@ void tst_QtConcurrentRun::returnValue() struct TestClass { void foo() { } - typedef void result_type; void operator()() { } void operator()(int) { } void fooInt(int){ }; @@ -329,7 +324,6 @@ struct TestClass struct TestConstClass { void foo() const { } - typedef void result_type; void operator()() const { } void operator()(int) const { } void fooInt(int) const { }; |