i have been spending another 3 days trying to get xcode 11 to work with c++20 modules. no luck.
clang on my machine (latest versions of xcode, clang, mac os) however is perfectly capable of handling modules thru a makefile. but IDE support seems to be zilch, i cant get xcode to recognize and parse (no less compile) any module file (whatever extension i give this, wherever i put it, associate it with, etc).
a year ago i also hit my head against the wall.
c++20 modules. can I use them "today" with Xcode 11?
c++20 modules (experimenting with Xcode 11)
incidentally i also had no luck with IDE support for modules with clion and vscode... im flabbergasted that c++20 modules seem to take so long to get support, at least for the modules you write yourself, not the standard library etc stuff - for me, that can wait as it may be more complicated to implement and is not so closely related to the well-organizedness and "modular" design of your own code and projects...
anyway, my questions:
- can YOU get modules to work (ie. module files automatically be identified compiled, exported and imported) in xcode 11 or any other IDE?
- will xcode 12 offer (more) support?
thx
edit: just to justify my obsession with this matter, i just read stroustrup a tour of c++ 2ed: (my bold)
The differences between headers and modules are not just syntactic.
- A module is compiled once only (rather than in each translation unit in which it is used).
- Two modules can be imported in either order without changing their meaning.
- If you import something into a module, users of your module do not implicitly gain access to (and are not bothered by) what you imported: import is not transitive.
The effects on maintainability and compile-time performance can be spectacular.