为什么以下C++代码无法用VC2017编译?
struct FixedMatchResults
{
static constexpr std::size_t count() { return 20; };
std::array<int, count()> results;
};
Run Code Online (Sandbox Code Playgroud)
错误是:
错误C2975:'_ Size':'std :: array'的模板参数无效,是预期的编译时常量表达式
归档时间: |
|
查看次数: |
257 次 |
最近记录: |