你能看出这个函数声明有什么问题吗?
template<typename... Containers>
std::tuple<typename Containers::value_type...>
foo(const Containers &...args);
当我尝试调用它时,如下所示:
foo(std::list<int>(), std::vector<float>());
MSVC2013 说error C2027: use of undefined type 'std::tuple<Containers::value_type>
。
我尝试使用“延迟返回”语法重写函数声明,但没有任何区别。
有什么方法可以实现这段代码想要做的事情吗?