I have installed new (17 days ago) folly and wangle from sources.
I try compile sources of native client from HBASE-14850 branch.
These sources are old.
I have problem:
```
template <typename F, typename R = futures::detail::callableResult<T, F>>
typename R::Return then(F&& func) {
return this->template thenImplementation<F, R>(
std::forward<F>(func), typename R::Arg());
}
```
from /usr/local/include/folly/futures/Future.h
Is template called from
```
// mimic: std::invoke_result_t, C++17
template <typename F, typename... Args>
using invoke_result_t = typename invoke_result<F, Args...>::type;
```
from /usr/local/include/folly/functional/Invoke.h
but is called from
```
GetRegionLocations(actions, locate_timeout_ns)
.then([=](std::vector<Try<std::shared_ptr<RegionLocation>>> &loc) {
std::lock_guard<std::recursive_mutex> lck(multi_mutex_);
ActionsByServer actions_by_server;
std::vector<std::shared_ptr<Action>> locate_failed;
```
from
/home/andrzej/projects/simple-hbase2/src/hbase/client/async-batch-rpc-retrying-caller.cc
- my project
I have turn on -std=gnu++17
There are error and notes:
====================================================
/home/andrzej/projects/simple-hbase2/src/hbase/client/async-batch-rpc-retrying-caller.cc|259|error:
no matching function for call to
‘folly::Future<std::vector<folly::Try<std::shared_ptr<hbase::RegionLocation>
> > >::then(hbase::AsyncBatchRpcRetryingCaller<REQ,
RESP>::GroupAndSend(const std::vector<std::shared_ptr<hbase::Action> >&,
int32_t) [with REQ = std::shared_ptr<hbase::Row>; RESP =
std::shared_ptr<hbase::Result>; int32_t =
int]::<lambda(std::vector<folly::Try<std::shared_ptr<hbase::RegionLocation>
> >&)>)’|
/usr/local/include/folly/futures/Future.h|737|note: candidate:
template<class F, class R> typename R::Return
folly::Future<T>::then(F&&) [with F = F; R = R; T =
std::vector<folly::Try<std::shared_ptr<hbase::RegionLocation> > >]|
/usr/local/include/folly/futures/Future.h|737|note: substitution of
deduced template arguments resulted in errors seen above|
/usr/local/include/folly/futures/Future.h|753|note: candidate:
template<class R, class Caller, class ... Args> folly::Future<typename
folly::isFuture<F>::Inner> folly::Future<T>::then(R (Caller::*)(Args
...), Caller*) [with R = R; Caller = Caller; Args = {Args ...}; T =
std::vector<folly::Try<std::shared_ptr<hbase::RegionLocation> > >]|
/usr/local/include/folly/futures/Future.h|753|note: template argument
deduction/substitution failed:|
/home/andrzej/projects/simple-hbase2/src/hbase/client/async-batch-rpc-retrying-caller.cc|259|note:
mismatched types ‘R (Caller::*)(Args ...)’ and
‘hbase::AsyncBatchRpcRetryingCaller<REQ, RESP>::GroupAndSend(const
std::vector<std::shared_ptr<hbase::Action> >&, int32_t) [with REQ =
std::shared_ptr<hbase::Row>; RESP = std::shared_ptr<hbase::Result>;
int32_t =
int]::<lambda(std::vector<folly::Try<std::shared_ptr<hbase::RegionLocation>
> >&)>’|
/usr/local/include/folly/futures/Future.h|770|note: candidate:
template<class Executor, class Arg, class ... Args> auto
folly::Future<T>::then(Executor*, Arg&&, Args&& ...) [with Executor =
Executor; Arg = Arg; Args = {Args ...}; T =
std::vector<folly::Try<std::shared_ptr<hbase::RegionLocation> > >]|
/usr/local/include/folly/futures/Future.h|770|note: template argument
deduction/substitution failed:|
/home/andrzej/projects/simple-hbase2/src/hbase/client/async-batch-rpc-retrying-caller.cc|259|note:
mismatched types ‘Executor*’ and
‘hbase::AsyncBatchRpcRetryingCaller<REQ, RESP>::GroupAndSend(const
std::vector<std::shared_ptr<hbase::Action> >&, int32_t) [with REQ =
std::shared_ptr<hbase::Row>; RESP = std::shared_ptr<hbase::Result>;
int32_t =
int]::<lambda(std::vector<folly::Try<std::shared_ptr<hbase::RegionLocation>
> >&)>’|
/usr/local/include/folly/futures/Future-inl.h|975|note: candidate:
folly::Future<folly::Unit> folly::Future<T>::then() [with T =
std::vector<folly::Try<std::shared_ptr<hbase::RegionLocation> > >]|
/usr/local/include/folly/futures/Future-inl.h|975|note: candidate
expects 0 arguments, 1 provided|
====================================================
How I can change this piece of sources to fit new folly?