The C++ 11 std::future lacks a then method to attach continuations to the future.
The Boost boost::future provides this, and t
Boost.Thread comes in several versions of which you can choose via the BOOST_THREAD_VERSION macro. Currently, the default is 2.
Up to version 2 of Boost.Thread, the name boost::unique_future was used for this class template (compare to boost::shared_future). Probably because of the standardization of std::future, more recent versions can use the name boost::future. Starting with version 3, boost::future is the default name.
The selection which name is to be used is done via a preprocessor macro:
When
BOOST_THREAD_VERSION==2defineBOOST_THREAD_PROVIDES_FUTUREif you want to useboost::future. WhenBOOST_THREAD_VERSION>=3defineBOOST_THREAD_DONT_PROVIDE_FUTUREif you want to useboost::unique_future.
From boost docs: unique_future vs future
So you can either explicitly enable boost::future by using BOOST_THREAD_PROVIDES_FUTURE or switch to a more modern version of Boost.Thread by setting BOOST_THREAD_VERSION to 4, for example.