Flavors of C++ with Visual C++

This came up in a forum discussion: what flavors of C++ are there, and what do they mean?

  1. There is regular C. Not C++ of course, but it bears mentioning because C is supported by the C++ compiler. Not all features of the C standard are supported. Which ones are is mostly customer driven (customers being the people with a lot of money, not you and me probably)
  2. regular C++. Also refered to as native C++, ISO C++. Code is portable across platforms, and compiled to native machine code. There is no ABI for C++, so compiled code is not binary compatible between compilers or even different versions of the same compiler.
  3. Managed C++. Also known as Managed Extensions for C++. It was the first version of the Microsoft C++ language for dealing with the CLR. It was an abomiation upon men. It was ugly and had a hst of problems. If you’ve never seen it, consider yourself lucky. If you ever had to use it, you have my sympathy. It was deprecated with Visual Studio 2005, and we like to pretend it never existed.
  4. C++/CLI this is the current version of the C++ language which targets the CLR. Contrary to Managed C++, the language and the syntax are user friendly. It is meant to allow native C++ and .NET to interoperate.
  5. C++/CX this is the version of C++ that is used for building C++ metro apps with XAML. It looks a lot like C++/CLI. when I first saw it, I thought it actually was C++/CLI. It is something different however, and for obvious reasons, you cannot mix C++/CLI and C++/CX in the same source file. The compiler would not know which is which.

Leave a Reply

Your email address will not be published. Required fields are marked *