TRT
Sign in

Expert · Module 15 · Lesson 2 of 4

Modules: Compiled Interfaces Beyond Header Inclusion

Define an exported C++ module interface, separate public API from implementation, and understand what modules do and do not solve.

Pro — members onlyAbout 10 minutes

By the end you can

  • Distinguish a module interface from a textual header
  • Explain export and import boundaries
  • Identify build-system and ABI concerns that remain after adopting modules

Builds on Build Systems and Toolchains: CMake Basics.

01 · A question first

A widely included header forces thousands of files to reparse after one small edit. Can the compiler cache a typed interface instead of pasting text into every translation unit, and what public names should cross that boundary?

Make a guess before you read on.

02 · The idea

Members only

Unlock the full lesson

This lesson is part of the membership. Join to read it in full, along with every other premium deep dive.

What's inside

  • Start with the problem
  • How the idea works
  • Why it is correct
  • What it costs
  • Pitfalls and variations
  • Production guidance

Something wrong with this lesson? Report a problem