Skip to content

Commit

Permalink
Changing use of C++14 capture initialization to usual functor in pplx…
Browse files Browse the repository at this point in the history
…task_tests.hpp
  • Loading branch information
AntonBikineev committed Feb 27, 2016
1 parent e708c1a commit 2320e0c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Release/tests/functional/pplx/pplx_test/pplxtask_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,25 @@ TEST(TestTasks_void_tasks_default_construction)

TEST(TestTasks_movable_then)
{
// create movable only type
struct A
{
A() = default;
A(A&&) = default;
A& operator=(A&&) = default;

// explicitly delete copy functions
A(const A&) = delete;
A& operator=(const A&) = delete;

char operator()(int)
{
return 'c';
}
} a;

task<int> task = create_task([]{ return 2; });
auto f = task.then([a = std::move(a)](int) { return 'c'; });
auto f = task.then(std::move(a));

IsTrue(f.get() == 'c', L".then should be able to work with movable functors");
}
Expand Down

0 comments on commit 2320e0c

Please sign in to comment.