Opened 8 years ago
Closed 8 years ago
#10963 closed Bugs (fixed)
future<future<T>>::then Has No Implementation
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Boost 1.58.0 | Component: | thread |
Version: | Boost 1.57.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Linker errors when using .then() on a future<future<T>>
Undefined symbols for architecture x86_64: "boost::future<boost::result_of<TestCallback (boost::future<boost::future<void> >)>::type> boost::future<boost::future<void> >::then<TestCallback>(TestCallback&&)", referenced from: _main in test_100000.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Example:
struct TestCallback { typedef boost::future<void> result_type; result_type operator()(boost::future<void> future) const { future.get(); return boost::make_ready_future(); } result_type operator()(boost::future<boost::future<void>> future) const { future.get(); return boost::make_ready_future(); } }; int main() { boost::promise<void> test_promise; boost::future<void> test_future(test_promise.get_future()); test_future.then(TestCallback()).then(TestCallback()); return 0; }
Change History (4)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
Hrr, I have not implemented yet the implicit unwrap when calling future::then.
comment:3 by , 8 years ago
Milestone: | To Be Determined → Boost 1.58.0 |
---|
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
This is weird. The result of
should be future<void> and so future<future<void>::then will not necessary in this case.
I'm not saying that there is no problem. I will add the test and check it.