Organizing and building a project with the "old" C++ compilation model usually follows some common practice:
- Put your public headers in a
includedirectory. - Put implementation and private headers in a
srcdirectory - Compile a library from your sources
- Distribute the library (static or dynamic) together with the public headers
Of course there are many different ways to achieve this, but the main point here is: You distribute the library binary and public headers as plain text.
Now with modules, the compilation model can change drastically. But everything I found so far only explains how to use modules in a closed project - no distribution, no outside dependencies.
Now it would be possible to put everything belonging to a particular module in a single file (which would have some nice benefits like avoiding duplication of declararions). That opens the question: What do I have to distribute to enable others to use my library? And what parts can I keep private? Maybe this is solved with implementation units?