【发布时间】:2016-01-10 17:58:46
【问题描述】:
这可能有一个非常简单的答案,但我真的想不通。为什么这样做会出错?初始化这样的东西的正确方法是什么?
std::array<std::tuple<int, std::string>, 3> tuples{
{3, "a"},
{7, "b"},
{2, "c"}
};
在 MSVC 2015 上,我收到以下错误:
No suitable constructor exists to convert from "int" to "std::tuple<int, std::string>"
No suitable constructor exists to convert from "const char[2]" to "std::tuple<int, std::string>"
【问题讨论】: