Your Library
Chapter 3 · Separate CompilationInterfaces, modules, namespaces, and function boundaries
Contents
Chapter 2

Separate Compilation

Interfaces, modules, namespaces, and function boundaries

Real C++ programs are assembled from parts developed and compiled separately. This chapter explains how declarations define interfaces, how headers and C++20 modules make those interfaces available, and how namespaces prevent name collisions. It also develops practical rules for passing arguments and returning values safely and efficiently.

In this chapter

  1. 2.1Lesson 3: Separate Compilation