Compiler Error C2755
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C2755.
param' : non-type parameter of a partial specialization must be a simple identifier
The non-type parameter needs to be a simple identifier, something the compiler can resolve at compile time to a single identifier or a constant value.
The following sample generates C2755:
// C2755.cpp
template<int I, int J>
struct A {};
template<int I>
struct A<I,I*5> {}; // C2755
// try the following line instead
// struct A<I,5> {};
Show: