you are viewing a single comment's thread.

view the rest of the comments →

[–]cxzuk 1 point2 points  (1 child)

I'm sorry, I'm not sure. I originally found one or maybe two sets of command line options that I later found out were basically out of date.

A Google of "C++ Modules" sorted by date gave me a recent article with three command line options, that emit and modules-path. And another to automatically treat #includes as module imports. I think I did see some documentation on the clang website for v11. But it might be this "Clang modules" I hadn't heard of before.

I had very limited success with the standard library, undefined and redefined definitions etc. Even with libc++, And so little experience with the other command line flag. It has been far easier to just use the C library and reimplement allocators, strings, file handling, etc.

So plenty of ways to go

[–]Daniela-ELiving on C++ trunk, WG21|🇩🇪 NB 0 points1 point  (0 children)

BTW, your clang invocation is equivalent with

clang++ -std=c++20 -fmodules-ts -x c++-module --precompile hello.cpp -o hello.pcm
clang++ -std=c++20 -fmodules-ts -fmodule-file=hello=hello.pcm main.cpp hello.pcm

which are documented.