<分区>
template <typename... Ts>
typename std::tuple_element<0, std::tuple<Ts...> >::type // or decltype(auto)
callFunction(Ts&&... ts)
{
using type = typename std::tuple_element<0, std::tuple<Ts...> >::type;
auto it = multiCache.find(typeid(type));
assert(it != multiCache.end());
auto&& fn = boost::any_cast<const std::function<type(Ts...)>&>(it->second);
return fn(std::forward<Ts>(ts)...);
}
typename std::tuple_element<0, std::tuple<Ts...> >::type
的含义是返回的类型与Ts...
中第一个元素的第一个元素相同,对吧?