
10 Feb
2013
10 Feb
'13
9:21 a.m.
Le 10/02/13 12:36, Szymon Gatner a écrit :
2013/2/10 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>:
I have made some updates to future.hpp and now the two tests work correctly. I don't know if all the modifications are absolutely needed.
Please, could you give it a try?
Original test code compiles OK now but unfortunately fails in other place:
#include <boost/thread/future.hpp> #include <boost/container/vector.hpp>
typedef boost::container::vector<int> V;
int main() { boost::future<V> vf; V v(boost::move(vf.get())); // fails to compile // also fails: V v = boost::move(vf.get()) }
vf.get() returns a rvalue and so boost::move doesn't work. You should use V v(vf.get()); Best, Vicente