Guidelines for a Module Structure
Understand how to structure a module with code snippets.
We'll cover the following...
Let’s examine guidelines for how to structure a module.
Press + to interact
module; // global module fragment#include <headers for libraries not modularized so far>export module math; // module declaration; starts the module purviewimport <importing of other modules><non-exported declarations> // names only visibile inside the moduleexport namespace math {<exported declarations> // exported names}
This guideline serves one purpose: give you a simplified structure of a module and an idea of what I’m going to write about. So, what’s new in this module structure?
-
The global module ...