3 ms·
Do you know how much c++/cli is automatically compatible with c# code? And how much does it retain compatibility with standard c++?
by The_rationalist 7y ago
Do you know how much c++/cli is automatically compatible with c# code?
And how much does it retain compatibility with standard c++?
- pjmlp 7y agoEverything that obeys to CLS. https://docs.microsoft.com/en-us/dotnet/standard/language-independence-and-language-independent-components#Rules https://docs.microsoft.com/en-us/dotnet/standard/language-in... https://docs.microsoft.com/en-us/cpp/dotnet/managed-types-cpp-cli?view=vs-2019 https://docs.microsoft.com/en-us/cpp/dotnet/managed-types-cp... Then you can also use regular low level stuff, but in that case you will get mixed mode Assemblies (other forms are now deprecated). https://docs.microsoft.com/en-us/cpp/dotnet/mixed-native-and-managed-assemblies?view=vs-2019 https://docs.microsoft.com/en-us/cpp/dotnet/mixed-native-and... C++/CLI is basically a set of language extensions, just like clang and gcc have theirs. Right now it supports up to C++14, if I am not mistaken. Many don't seem to realise that CLR started as the next evolution of COM, with the required machinery to support VB, C#, J# and C++, alongside any other language that could fit the same kind of semantics.
- The_rationalist 7y agoThank you, this is very interesting!