Compiler Error C3075
'instance' : you cannot embed an instance of a reference type, 'type', in a value-type
A value type cannot contain an instance of a reference type.
For more information, see C++ Stack Semantics for Reference Types.
Example
The following sample generates C3075.
// C3075.cpp
// compile with: /clr /c
ref struct U {};
value struct X {
U y; // C3075
};
ref struct Y {
U y; // OK
};
Athugasemdir
https://aka.ms/ContentUserFeedback.
Væntanlegt: Á árinu 2024 munum við hætta með GitHub-mál sem ábendingaleið fyrir efni og skipta því út fyrir nýtt ábendingakerfi. Frekari upplýsingar er að finna hér:Senda inn og skoða endurgjöf fyrir