Modules (since C++20)
Modules help divide large amounts of code into logical parts.
Modules are orthogonal to namespaces.
Syntax
export (optional) module module-name module-partition(optional) attribute-specifier-seq(optional); | (1) | |
export declaration | (2) | |
export { declaration-seq(optional) } | (3) | |
export (optional) import module-name attribute-specifier-seq(optional); | (4) | |
export (optional) import module-partition attribute-specifier-seq(optional); | (5) | |
export (optional) import header-name attribute-specifier-seq(optional); | (6) | |
module ; top-level-declaration-seq(optional) | (7) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/language/modules