Infopulse - Expert Software Engineering, Infrastructure Management Services
Send message Request a call
Send message Please fill in this quick form and we will send you a free quote shortly.
* Required fields
Request a call Please fill in this quick form and we will call you back shortly.
* Required fields
Subscribe to Infopulse Newsletter Please fill in this quick form to be among the first to receive our updates.
* Required fields
Send an email to Volodymyr Korniichuk Please fill in this quick form to contact our expert directly.
* Required fields
Read the rest of the Case Study Don't miss the most interesting part of the story!
Submit this quick form to see the rest and to freely access all case studies on our website.
* Required fields

C++ module support in Visual Studio 2015 Update 1

MS VC 2015 Update 1 Timeframe The 2015 CppCon conference, which took place in September, witnessed a claim from the developers of Visual C++ compiler, that the next update (Visual Studio 2015 Update 1) of C++ compiler by Microsoft will feature module support – an experimental feature from the new (not yet adopted) C++ standard.

Some words to explain the importance of this innovation: the mechanism of using components in programs written in C++ dates back some 35 years ago. This mechanism is not a convenient one: if you want to create a library, you will have to create a header file and accompany it with the code or the compiled version of the library. It generates lots of problems:

  • the header file and library are separate files, which means that one of them may be lost, or they may accidentally become out of synch;
  • the header file is included in the code by the #include preprocessor directive, which, firstly, slows down the compilation, and, secondly, piles up the influence of everything which is written in the header files upon each other and upon the final code. It is not infrequent, that headers must be included in a specific order, or that some macros must be determined, for the code to compile correctly.

This means that C++ lacks the notions of assembly and package. Unlike C# or Python, where installing components is easy, adding a new library in C++ may have unexpected results. The module support in C++, which is being introduced now, aims at solving this problem by eliminating the #include preprocessor directive and treating the components as a unity, which consists of a code and metadata and can be easily added. As an eventual result, new components may be added to a project significantly faster, full-scale package managers will appear, and adding a library will require executing one line of code or several mouse clicks.

Below are the links to the proposed draft of the module standard and its realization in Visual C++ and Clang.

C++ Compiler options


Share this blog article:
Subscribe to our Newsletter