I've some questions about C++/CLR C++ Interop (basically mixing C++ unmanaged and managed code).
If I create an application with C++/CLR and I write unmanaged and managed code, for example:
int main(int argc, char*argv[]) { int a = 30; int* a_ptr = &a; std::cout << a_ptr << std::endl; Console::WriteLine("This is managed code"); }
As the 4th line is managed .NET code, it will go through the CLR. But will the first three lines go through the CLR too or will they be handled separately? Will it reduce the performance if i write only C++ unmanaged code in an CLR project?
Does the C++/CLR project change anything in the C++ language, for example the primitives or stuff like that?
How does it work? How is the CLR being called if it detects that a command uses it... or does everything go through it?