| 1 |
/* |
| 2 |
https://docs.microsoft.com/en-us/cpp/cpp/tutorial-named-modules-cpp?view=msvc-170 |
| 3 |
*/ |
| 4 |
export module BasicPlane.Figures:Rectangle; // defines the module partition Rectangle |
| 5 |
|
| 6 |
import :Point; |
| 7 |
|
| 8 |
export struct Rectangle // make this struct visible to importers |
| 9 |
{ |
| 10 |
Point ul, lr; |
| 11 |
}; |
| 12 |
|
| 13 |
// These functions are declared, but will |
| 14 |
// be defined in a module implementation file |
| 15 |
export int area(const Rectangle& r); |
| 16 |
export int height(const Rectangle& r); |
| 17 |
export int width(const Rectangle& r); |