Compiler Error C3896
'member' : improper initializer: this literal data member can only be initialized with 'nullptr'
A literal data member was initialized incorrectly. See nullptr for more information.
The following sample generates C3896:
// C3896.cpp
// compile with: /clr /c
ref class R{};
value class V {
literal R ^ r = "test"; // C3896
literal R ^ r2 = nullptr; // 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