📜 ⬆️ ⬇️

C ++ module support in Visual Studio 2015 Update 1

At the CppCon conference, which is taking place right now, the Visual C ++ compiler development team announced that in the next update (Visual Studio 2015 Update 1), an experimental feature will be added to the C ++ compiler from Microsoft from the new (not yet approved) C ++ standard - module support!



For those who do not know what is the epoch-making of this event: it so happened that the mechanism of using components in C ++ programs was thought up about 35 years ago. It cannot be called convenient: if you want to create a library, you need to make a header file and distribute either a code or a compiled version of the library with it. This raises a lot of problems:

')
As a result, in the C ++ infrastructure there are no concepts of “assemblies” or “packages” and, unlike C # or Python, where the installation of components is trivial, in C ++, connecting each new library may incur its own surprises. The proposed mechanism of modules in C ++ is designed to remove this problem, abandon the preprocessor directive #include and refer to components as an entity consisting of code and metadata, holistic and easily connectable. As a result, we can soon get a significant acceleration of the introduction of new components into the project, the emergence of full-fledged package managers, the installation of a new library will be reduced to executing one line or several mouse clicks. Is this not happiness!

Under a cat there will be examples of use and links to documentation.


The presentation video is not yet available on the conference channel, so all we have is a few photos from Twitter, and links to the proposed draft standard for modules and its implementation in Visual C ++ and Clang.





Source: https://habr.com/ru/post/267781/


All Articles