带有如下所示语句的代码可以使用 g++.exe(x86_64-posix-seh-rev4,由 MinGW-W64 项目构建)4.8.2 编译,但不能使用最新的Visual Studio 2013 Update 3 CTP 2 (12.0.306020.00更新 3 CTP)
问题:我可能做错了什么,比如没有打开某些功能,或者最新的 Visual Studio 2013 不支持这样的陈述吗?代码需要在 Visual Studio 下编译——关于如何解决这个限制的任何建议?
namespace NA
{
namespace NB
{
class C1 : P1
{
static constexpr double one = 1.0;
static constexpr double two = one + one;
static constexpr float a_foo[][2] = { { 1.0, 1.1, 1.2 },
{ 2.0, 2.1, 2.2 } };
static constexpr int n_ele = 1024;
static constexpr int n_d = 128;
static constexpr int n_ape = n_ele -
n_d +
1;
std::vector< std::array< int, (int)n_ele >> ape
{
std::vector< std::array< int, (int)n_ele >>
( (int)n_ape, {{0}} )
};
std::array<
std::array< int, (int)n_d >,
(int)n_ape
> c_to_e = {{ std::array< int, (int)n_d >( {0} ) }};
}
}
}