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> {};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for