Compiler Error C3809
'class' : a managed or WinRT type cannot have any friend functions/classes/interfaces
Managed types and Windows Runtime types do not allow friends. To fix this error, do not declare friends inside managed or Windows Runtime types.
The following sample generates C3809:
// C3809a.cpp
// compile with: /clr
ref class A {};
ref class B
{
public:
friend ref class A; // C3809
};
int main()
{
}
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