Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
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:
http://clang.llvm.org/docs/Modules.html

A small descriprive article in Russian:
http://habrahabr.ru/company/infopulse/blog/267781/

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: 71
Registered: October 2011
Member
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: 882
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello,

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
{
public:
    // 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.

Sincerely,
Klugier


Ultimate++ - 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: Sun Sep 26 23:52:53 CEST 2021

Total time taken to generate the page: 0.01267 seconds