Developers Club geek daily blog

1 year, 10 months ago
At the CppCon conference which takes place right now, the design team of the compiler Visual C ++ has declared that in the following updating (the Visual Studio of 2015 Update 1) experimental opportunity from new (yet not approved) the standard C ++ — support of modules will be added to the compiler C ++ from Microsoft!

Support of C ++ modules in the Visual Studio of 2015 Update 1

For those who is not aware in what epochality of this event: so it has developed that the mechanism of use of components in programs on With ++ was constructed somewhere about 35 years ago. It is impossible to call it convenient: if you want to create library — you need to make the heading file and to extend with it either code, or the compiled version of library. Thus there is array of problems:
  • The heading file and library — separate files, one of them can be lost, or they can accidentally be desynchronized.
  • The heading file joins in code the directive of preprocessor #include that first, slows down compilation, and secondly adds influence of everything that is written in heading files at each other and on final code. Cases when heading files need to be included in certain order are frequent or to define some macroes that the code has normally gathered.


As a result in infrastructure With ++ there are no concepts of "assemblies" or "packets" and, in difference from С# or Python where installation of components is trivial, in With ++ connection of each new library can bear the surprises. The offered mechanism of modules in With ++ is urged to clean this problem, to refuse the directive of preprocessor #include and to refer to components, as to some entity consisting of code and metadata, complete and easily connected. As a result we can soon receive essential acceleration of implementation of new components in the project, appearance of full-fledged managers of packets, installation of new library will be reduced to execution of one line or several cliques mouse. Whether this happiness!

Under cat there will be examples of use and the link to documentation.


Video of presentation meanwhile is not available on the channel of conference so that we have everything — some photos from the twitter and links to the offered draft of the standard of modules and its implementation in the Visual C ++ and Clang.

Support of C ++ modules in the Visual Studio of 2015 Update 1

Support of C ++ modules in the Visual Studio of 2015 Update 1


This article is a translation of the original post at habrahabr.ru/post/267781/
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here: sysmagazine.com@gmail.com.

We believe that the knowledge, which is available at the most popular Russian IT blog habrahabr.ru, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.
Best wishes.

comments powered by Disqus