Compiler Error C2976
'identifier' : too few type arguments
A generic or template is missing one or more actual arguments. Check the generic or template declaration to find the correct number of parameters.
This error can be caused by missing template arguments in C++ Standard Library components.
The following sample generates C2976:
// C2976.cpp
template <class T>
struct TC {
T t;
};
int main() {
TC<>* t; // C2976
TC<int>* t2; // OK
}
C2976 can also occur when using generics:
// C2976b.cpp
// compile with: /clr
generic <class T>
ref struct GC {
T t;
};
int main() {
GC<>^ g; // C2976
GC<int>^ g2; // OK
}
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