|
Boost Users : |
Subject: [Boost-users] Difficulty using promises and futures
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2013-04-10 18:15:27
Hello,
I would like to use promises and futures in our embedded app.
We're targeting ArchLinux ARM. I believe we can build against a GCC 4.7.2
toolchain which has either C++0x or possibly even C++11 (somewhat) support.
I am trying to setup a couple of simple issues to make it even compile, but
am having trouble.
boost::packaged_task<vector<int> >
int_vect_pt_(simple_vector_getter);
boost::unique_future<vector<int> > int_vect_f_ =
int_vect_pt_.get_future();
boost::thread task(boost::move(int_vect_pt_));
boost::packaged_task<int> int_pt_(simple_getter);
boost::unique_future<int> int_f_ = int_pt_.get_future();
boost::thread task(boost::move(int_pt_));
Error(s):
Description Resource Path Location Type
'boost::move' is ambiguous '
Candidates are:
boost::type move(boost::packaged_task<int> &)
' optics.cpp /detector/devices line 156 Semantic Error
Description Resource Path Location Type
'boost::move' is ambiguous '
Candidates are:
boost::type move(boost::packaged_task<std::vector<int,std::allocator<int>>>
&)
' optics.cpp /detector/devices line 152 Semantic Error
Can anyone help or otherwise advise? I've even got a "crude" future
implementation in C# .NETCF for pity's sake... Anyway, if necessary, what
did we do before promises/futures? ;-)
Thank you...
Regards,
Michael Powell
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net