Compiler Error C3880
'var' : cannot be a literal data member
The type of a literal attribute must be, or compile-time convertible to, one of the following types:
integral type
string
enum with an integral or underlying type
The following sample generates C3880:
// C3880.cpp
// compile with: /clr /c
ref struct Y1 {
literal System::Decimal staticConst1 = 10; // C3880
literal int staticConst2 = 10; // 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