Module Interface Unit and Module Implementation Unit
Get details about how the module interface unit and module implementation unit work.
We'll cover the following...
When the module becomes bigger, you should structure it into a module interface unit and one or more module implementation units. Following the previously mentioned guidelines to structure a module, I will refactor the previous version of the math
module.
Module interface unit
Press + to interact
// mathInterfaceUnit.ixxmodule;#include <vector>export module math;export namespace math {int add(int fir, int sec);int getProduct(const std::vector<int>& vec);}
-
The module interface unit ...