Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is C++ CLI a superset of C++?

Tags:

c++

clr

c++-cli

Would a C++ CLI compiler be able to compile some large sets of C++ classes without modifications?

Is C++ CLI a superset of C++?

like image 742
Brian R. Bondy Avatar asked Oct 07 '08 18:10

Brian R. Bondy


People also ask

What is the difference between C++ and C++/CLI?

C++ runs directly as binary complied for your hardware. C++ cli is a c++ extension that is used to interface with the MS common language runtime. It complies to IL normally and is executed inside the . net runtime.

What does C++/CLI stand for?

C++/CLI is variant of the C++ programming language, modified for Common Language Infrastructure.

Is C++ CLI faster than C#?

Performance: C++ is widely used when higher level languages are not efficient. C++ code is much faster than C# code, which makes it a better solution for applications where performance is important.

What is Gcnew in Visual C++?

gcnew is an operator, just like the new operator, except you don't need to delete anything created with it; it's garbage collected. You use gcnew for creating . Net managed types, and new for creating unmanaged types.


2 Answers

According to Wikipedia:

C++/CLI should be thought of as a language of its own (with a new set of keywords, for example), instead of the C++ superset-oriented Managed C++

like image 111
Steve Klabnik Avatar answered Sep 29 '22 09:09

Steve Klabnik


technically no, but depending how standard the C++ code is, you'll probably be just fine. when you get into windows stuff you may run into issues. I compiled the whole game engine we use at work in C++/CLI once and it worked just fine. A colleague did the same for all of mozilla and no such luck.

like image 25
Dustin Getz Avatar answered Sep 29 '22 11:09

Dustin Getz