Upgraded to Sequoia & Xcode 16.0, now build doesn't work

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__format/formatter_floating_point.h:66:30: error: 
      'to_chars' is unavailable: introduced in macOS 13.3
   66 |   to_chars_result __r = std::to_chars(__first, __last, __value, __fmt);

Which, ok, I can accept that this is true. Except that this worked on Friday, on the same machine running Sonoma and the previous version of Xcode. The project is configured for a deployment target of 12.0, so it should have failed before, but didn't.

(This is a CMake-generated xcodeproj, but that also should not have been any change.)

There are a number of changes that reference Xcode 16's C++ language support listed here. here. Perhaps this error is related to one of those.

@kithrup Additionally, Xcode 16 Release Notes Fixed:

Swift projects that set a deployment target of macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0 and use constants from float.h such as FLT_RADIX in Swift sources will not link correctly. This will cause a crash when running on those OS versions. The crash will not occur when running on macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2 or later. (130107191)

As far as I can tell, this is a conflict between the nhollman json library, and a set of formatter headers added in Xcode 16. But since it's C++, I can't figure out what exactly is going on, or how to work around it.

But... something that is compiled with Xcode 15 for macOS 14, with a minimum deployment of 12.0, really should still work with Xcode 16 & macOS 15, shouldn't it?

Upgraded to Sequoia & Xcode 16.0, now build doesn't work
 
 
Q