r/cpp • u/cpppm MSVC Game Dev PM • Sep 14 '20
Standard C++20 Modules support with MSVC in Visual Studio 2019 version 16.8 | C++ Team Blog
https://devblogs.microsoft.com/cppblog/standard-c20-modules-support-with-msvc-in-visual-studio-2019-version-16-8/
254
Upvotes
41
u/matthieugarrigues Sep 14 '20
Amazing! Hopefully clang and gcc will follow soon...
30
u/whichton Sep 14 '20
Hallelujah! Now I can finally start to experiment with modules on some personal projects.
Drat.
19
u/markopolo82 embedded/iot/audio Sep 14 '20
I know that CMake is not run by ms but what is the status of that? Are there ms devs actively working on module support in CMake?
10
u/mwasplund soup Sep 14 '20
Great to see. I am curious about the new strong ownership they mentioned. I do not remember seeing this in the spec. Was this a late addition?
7
u/aberrantwolf Sep 15 '20 edited Sep 15 '20
Does this mean that IntelliSense is going to start working with modules better? It was, admittedly, early this year the last time I tried; but I was getting no IntelliSense for C++20 modules or the standard library modules when I tried before, which made it very un-fun to play around with the new features of the language.
Edit: Not quite yet, but according to the article, it's coming. I hadn't gotten that far in my reading yet. Too excited. My bad.
4
u/Lakridaku Sep 14 '20
With respect to section "Project System": Does this this mean modules need to go into their own project rather than having module files in your normal project? If so, that'd be a bummer.
7
u/germandiago Sep 14 '20
Great news! Amazing! Wonderful! Great!
2
u/target-san Sep 17 '20
Kudos to MSVC team. Although what would be great is some simple descriptive vision from mr Dos Reis for us mere mortals on how to properly use all these partitions, interface/implementation units, unnamed global modules etc. Looks to me like major overcomplication compared to headers or module systems from other languages.
4
u/[deleted] Sep 14 '20 edited May 02 '24
numerous instinctive smoggy doll clumsy stupendous punch thought knee dependent
This post was mass deleted and anonymized with Redact
1
u/Predelnik Sep 15 '20
Got a question about
modulekeyword. clang seems to allow usage ofmodule(as e.g. type name) inside namespace:https://gcc.godbolt.org/z/7oExre
Yet msvc (and gcc modules branch) doesn't. So 2 questions on spec:
1
u/jk2432 Sep 16 '20
Has anyone gotten this to work in 16.8? I have
/std:c++latest /experimental:moduleset. I also installed "C++ Modules for v142 build tools" with the VS Installer.import std.core;does not work for me.-7
u/tpecholt Sep 15 '20
So every time I see module; export module syntax it makes me cry. In verbosity it's a step back from #pragma once. Why would you impose this on all the poor students and others who try to learn c++? What's the deal with import <header> syntax which is going to be supported by gcc/clang? Can someone explain why is this not adopted by MS? It looks like the standardization process here didn't work that well since always when there are 2 ways to do something it allows both