What mean "this->template"

  • Thread starter Thread starter Borneq
  • Start date Start date
B

Borneq

Guest
Difference bettwen old a new facebook library folly:

/usr/local/include/folly/futures/Future.h
in old version:

template <typename F, typename R = futures::detail::callableResult<T, F>>
typename R::Return then(F&& func) {
return thenImplementation<F, R>(std::forward<F>(func), typename R::Arg());
}

and new :

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());
}

what means "this->template" for code using this template

new folly uses also:
/usr/local/include/folly/functional/Invoke.h
or /usr/include/c++/8/type_traits
/// std::invoke_result_t
template<typename _Fn, typename... _Args>
using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;

How change my code?

Continue reading...
 
Back
Top