A Practical Introduction to C++'s Modules

By Hendrik Niemeyer

Modularity is a long known principle for creating maintainable, changeable and durable software. In contrast to other programming languages, C++ did not have its own module system and used header files to structure code. But this has changed with C++20 which introduced modules as one of its bigger new features.

In this talk I will discuss the theoretical side of modules and their advantages over header files (e.g. faster compile times, invisibility of macros, preprocessor directives and non-exported entities, fewer name collisions and more) but the main focus will be the practical usage of modules today.

I will demonstrate how modules can be used today with the three major compilers and how to restructure your projects using modules. Also the support of build systems for modules will be discussed.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.