类似的问题已经有人问过。
但是,我想了解为什么对于数组,下面的第一行不编译而第二行编译:
template<int N> constexpr float x[2]; // ERROR - var not initialized. template<int N> constexpr float y[N]; // Can now specialize, e.g.: template<> constexpr float y<2>[2] = {0.0f, 1.0f};