阅读背景:

在函数调用时从异构初始化列表构建元组

来源:互联网 

Consider the following function

考虑以下功能

template <class... T, class... U>
void f(std::tuple<T...> t, std::tuple<U...> u)
{
    std::cout << sizeof...(T) << " " << sizeof...(U) << std::endl;
}

int main(int argc, char* argv[]) 
{
    f({3, 3.5, "Hello World!"}, {'a', std::string("b")}); // Fails
    return 0;
}
temp



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: