Opened 9 years ago
Closed 9 years ago
#8672 closed Bugs (fixed)
future<>::then(void()) doesn't works
| Reported by: | viboes | Owned by: | viboes |
|---|---|---|---|
| Milestone: | Boost 1.54.0 | Component: | thread |
| Version: | Boost 1.53.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
The following patch must be applied
Index: future.hpp
===================================================================
--- future.hpp (revision 84678)
+++ future.hpp (working copy)
@@ -3467,7 +3467,7 @@
Fp continuation;
public:
- explicit future_async_continuation_shared_state(
+ future_async_continuation_shared_state(
F& f, BOOST_THREAD_FWD_REF(Fp) c
) :
parent(f.future_),
@@ -3503,14 +3503,14 @@
template<typename F, typename Fp>
struct future_async_continuation_shared_state<F, void, Fp>: public future_async_shared_state_base<void>
{
- F& parent;
+ F parent;
Fp continuation;
public:
- explicit future_async_continuation_shared_state(
+ future_async_continuation_shared_state(
F& f, BOOST_THREAD_FWD_REF(Fp) c
) :
- parent(f),
+ parent(f.future_),
//continuation(boost::forward<Fp>(c)
continuation(boost::move(c))
{
@@ -3549,14 +3549,14 @@
template<typename F, typename Rp, typename Fp>
struct future_deferred_continuation_shared_state: shared_state<Rp>
{
- F& parent;
+ F parent;
Fp continuation;
public:
- explicit future_deferred_continuation_shared_state(
+ future_deferred_continuation_shared_state(
F& f, BOOST_THREAD_FWD_REF(Fp) c
) :
- parent(f),
+ parent(f.future_),
//continuation(boost::forward<Fp>(c)
continuation(c)
{
@@ -3583,14 +3583,14 @@
template<typename F, typename Fp>
struct future_deferred_continuation_shared_state<F,void,Fp>: shared_state<void>
{
- F& parent;
+ F parent;
Fp continuation;
public:
- explicit future_deferred_continuation_shared_state(
+ future_deferred_continuation_shared_state(
F& f, BOOST_THREAD_FWD_REF(Fp) c
):
- parent(f),
+ parent(f.future_),
continuation(boost::move(c))
{
this->set_deferred();
Change History (2)
comment:1 by , 9 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

(In [84717]) Thread: fix #8550, #8671, #8672.