C++17 support is not complete on MacOS depending on what deployment target is chosen.
I need to work around something, which happens when I chose deployment target < 10.14 and Language Dialect C++17.
Now the language dialect can be detected using the __cplusplus definition, but I can’t find a generally applicable way to detect what deployment target is chosen.
I think the macro you’re looking for is MAC_OS_X_VERSION_MIN_REQUIRED, which can be compared against predefined version numbers such as MAC_OS_X_VERSION_10_14. If you search the JUCE codebase for MAC_OS_X_VERSION_MIN_REQUIRED you’ll see some examples.
You’re correct that these definitions aren’t generally applicable in the same way as compiler built-in definitions. The macOS definitions aren’t generated by the Projucer though. Instead, they come from ‘AvailabilityVersions.h’ in the macOS SDK. That means they’ll work in any project (JUCE or otherwise) as long as that header is included.