Open zg9uagfv opened 5 years ago
The then
function comes from the proposed std::experimental::future::then
, which is still not in C++17. I was hoping the C++ Standard would catch up to my documentation. In the future, there will be a workaround to set ZKPP_FUTURE_USE_STD_EXPERIMENTAL
to 1
. This requires two changes:
cmake -DZKPP_BUILD_SETTING_FUTURE=STD_EXPERIMENTAL ..
#define ZKPP_FUTURE_USE_STD_EXPERIMENTAL 1
NOTE: This will not work unless you have <experimental/future>
implemented by your Standard Library implementation, which I don't know of any implementation this is true in. boost::future
has a then
implementation, but I haven't added ZKPP_BUILD_SETTING_FUTURE=BOOST_THREAD
equivalent (yet).
Sorry for bumping this old issue, but I'm facing the same problem. I saw that PR #112 was merged, but I can't figure out on how to use the .then
of boost, since it seems to expect more than one argument.
Is there a minimal working example anywhere?
+1
Sorry for bumping this old issue, but I'm facing the same problem. I saw that PR #112 was merged, but I can't figure out on how to use the
.then
of boost, since it seems to expect more than one argument. Is there a minimal working example anywhere?
Env:
Code:
Compile Command:
g++ --std=c++17 -I ~/github/zookeeper-cpp/src/ test.cpp
Compile Error:
test.cpp: In function ‘int main()’: test.cpp:37:28: error: ‘zk::future<zk::get_result> {aka class std::future<zk::get_result>}’ has no member named ‘then’ client.get("/foo/bar").then(print_thing<zk::get_result>);
thanks a lot!