Compile warnings on MacOS 10.15 with C++20

When updating our project’s compiler flags to use the C++20 dialect we’re seeing warnings when compiling on MacOS 10.15 (MacOS 10.15.7, Apple clang-1200.0.32.28, Xcode Version 12.3 (12C33)).

This can be observed on the latest tip of develop by setting CMAKE_CXX_STANDARD to 20 in the JUCE CMakeLists.txt file and building the all demos.

From what I’ve seen so far there are a handful of warnings in only two categories:


So far they’ve all been within:


We don’t appear to see the same errors on MacOS 11 dev machines.

We can work round it by disabling those warnings, but is there any trick I’m missing or possibility of fixing the warnings to compile with C++20 flags on MacOS 10.15? I’m happy to provide further information if needed.



Thanks for raising this, I’ve fixed the issues I found when building the demo projects in C++20 mode on Xcode 12, GCC 9.3, and MSVC 16.8.3

Hopefully this will resolve the issue, but please let us know if not.

Thanks Reuben. I’ll give it another try when we update JUCE and I’ll report back.