CppCon 2015: Gabriel Dos Reis “Large Scale C++ with Modules: What You Should Know"

CppCon · 22K views · 2015 · 1:00:59

Open on YouTube

C, C++, Rust, Go & systems languagesProgramming language designtalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering or asking about C++ modules, especially the experimental Visual Studio 2015 module switch and how modules affect compile time, inlining and templates.

Recommended by 2 people across 2 different months, 2015 to 2017.

What it is

A CppCon 2015 conference talk by Gabriel Dos Reis of Microsoft on the C++ modules proposal then before the standards committee. It covers the design goals and constraints, early implementations (including Visual Studio's experimental support), and initial migration experience for large codebases.

What people said

Recommends dxiv · 2015-11 · Stack Overflow · on “What can I do with C++ modules in Visual Studio 2015 so far? (using the experimental switch)”

See the CppCon 2015 presentation of Gabriel Dos Reis “ Large Scale C++ with Modules: What You Should Know " at [this video] . From [LINK] : The way modules are used (at around 40 minutes in the presentation) has a nasty quirk. The basic approach is that you have a source file foo.cpp, which defines a module Foobar. To compile this you should say this: cl -c /module foo.cxx The causes the compiler to output foo.o as well as Foobar.ifc, which contains the binary definition of the module. To use this you would compile a second source file like this: cl -c baz.cpp /module:reference Foobar.ifc This is basically the same way that Fortran does its modules [...]

Recommends StoryTeller - Unslander Monica · 2017-10 · Stack Overflow · on “Is everything after an exporting namespace not exported?”

@StarShine - There are the CppCon talks. Here's the one from 2015 [this video] . That's more introductory, but is probably different than the current state of the proposal. They originally aimed to add it into C++17.

Cites onqtam · 2016-03 · Stack Overflow · on “Can imported symbols from a module be inlined? And what about templates?”

So I just watched CppCon 2015: Gabriel Dos Reis “Large Scale C++ with Modules: What You Should Know" here [this video] and maybe I've missed it but can imported symbols from a module get inlined - like in LTO (and also - without the 3x slowdown in build time of LTO)? And also can templates be exported from a module or will all templated code remain in header files?

Cites TooTone · 2016-07 · Stack Overflow · on “What compile speed improvement can I expect with modules in Visual Studio 2015”

Watching the video [this video] referenced in this answer [LINK] , a more immediate question might be how to _migrate_ an existing large code base to Visual C++ modules ( this answer [LINK] is relevant), notwithstanding the fact that the support is experimental and modules sadly aren't in C++17 [LINK] . I'm leaving this question up in the hope it might be answered in the future.