Using C++'s modules with JUCE?

Hi everyone,

In general, I like the C++ language. Granted, some parts of it more than others, but one of my biggest nuisances has always been the split header/implementation in order to improve compilation times. Now, I recently read about C++ -modules and their experimental support in clang, which seem to allow you to directly write your implementation in the header-file, without slowing down compilation.

Unfortunately, very little examples seem to be available online and most information is several years old. (The (extensive) Clang modules documentation and a small blog post containing some information seemed the best resources).
Does any of you have any experience with them, especially in combination with JUCE? If so, how (much) did you have to change your compilation process? Does it play nice with the Projucer? And perhaps most important, was it worth the effort in your opinion?


Modules are still in their infancy and the committee haven’t even agreed on an approach yet so I doubt many people here will have played with them…

They really only come in to their own in large projects and there’s little point in converting a large project to use an unfinished, extremely likely to change spec at the moment at least.

The way JUCE uses unity-builds enables you to compile the whole library in just a few minutes on modern architecture so modules probably aren’t as relevant to JUCE as other codebases.

Having said that, I would be interested to know if anyone has experimented with them. I initially got quite excited by them, then lost faith a bit when I realised how far of modules will be for most of the code bases I use.