Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » Community » Coffee corner » C++ modules support is coming
C++ modules support is coming [message #45190] Sun, 27 September 2015 12:58 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Well, it looks like an epic change of C++ is to come. After Clang, the latest Miscrosoft's C++ 2015 Update 1 will have modules support.
What will it give us? Better build times, better portability, easier attach of libraries.
Here's description of what C++ modules are:
https://github.com/isocpp/CppCoreGuidelines/blob/master/talk s/Large-Scale-C%2B%2B-With-Modules.pdf
The proposal on possible implementation from Microsoft:
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2014/n421 4.pdf
The same from Clang:

A small descriprive article in Russian:

Re: C++ modules support is coming [message #47801 is a reply to message #45190] Thu, 30 March 2017 11:04 Go to previous messageGo to next message
rxantos is currently offline  rxantos
Messages: 72
Registered: October 2011
I don't understand.
What advantage do they give over static libraries?

Do they allow separation of implementation and declaration of templates?

If yes, I can see how they are useful. If no, then what exactly do they bring new?
Re: C++ modules support is coming [message #47803 is a reply to message #47801] Thu, 30 March 2017 23:01 Go to previous message
Klugier is currently offline  Klugier
Messages: 1077
Registered: September 2012
Location: Poland, Kraków
Senior Contributor

The modules concept are easy. Modules will drop support for current double file system (header and implementation) and unify it in one file like it is in other languages like Java or other modern languages like golang.

The code will look like this (Upp exampele)

// Core.cpp:
module Upp.Core;

class File
    // File methods...

// MyProject.cpp
import Upp.Core; // No include, however #include "" will be probably still possible for backwards compatibility.

CONSOLE_APP_MAIN // Macro handling is big mystery for me?
   File file;
   // Do something with the file...

The above example is only concept and it base only on my feature imagination. Of course the final implementation can be different, so you could study standard documentation to obtain more knowledge.


U++ - one framework to rule them all.

[Updated on: Thu, 30 March 2017 23:02]

Report message to a moderator

Previous Topic: Upp installer
Next Topic: Very impressed!
Goto Forum:

Current Time: Tue Jun 25 20:21:29 CEST 2024

Total time taken to generate the page: 0.02022 seconds