In file included from /path/to/project/_deps/juce-src/modules/juce_audio_basics/juce_audio_basics.mm:35:
In file included from /path/to/project/_deps/juce-src/modules/juce_audio_basics/juce_audio_basics.cpp:44:
In file included from /path/to/project/_deps/juce-src/modules/juce_audio_basics/juce_audio_basics.h:97:
/path/to/project/_deps/juce-src/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h:1208:45: error: no member named 'alignment_of_v' in namespace 'std'
1208 | auto requiredSampleAlignment = std::alignment_of_v<Type>;
| ~~~~~^
/path/to/project/_deps/juce-src/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h:1208:60: error: 'Type' does not refer to a value
1208 | auto requiredSampleAlignment = std::alignment_of_v<Type>;
| ^
/path/to/project/_deps/juce-src/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h:44:20: note: declared here
44 | template <typename Type>
| ^
/path/to/project/_deps/juce-src/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h:1208:65: error: expected expression
1208 | auto requiredSampleAlignment = std::alignment_of_v<Type>;
The fix is to add #include <type_traits> to the top of modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h
While I’m at it might as well report that we’re also getting a bunch of warnings that we didn’t previously:
/path/to/project/_deps/juce-src/modules/juce_core/native/juce_ObjCHelpers_mac.h:346:73: warning: cast from 'signed char (*)(id, SEL)' to 'IMP' (aka 'id _Nullable (*)(id _Nonnull, SEL _Nonnull, ...)') converts to incompatible function type [-Wcast-function-type-mismatch]
346 | [[maybe_unused]] const auto b = class_addMethod (cls, selector, (IMP) callbackFn, s.data());
| ^~~~~~~~~~~~~~~~
/path/to/project/_deps/juce-src/modules/juce_core/native/juce_ObjCHelpers_mac.h:340:52: note: in instantiation of function template specialization 'juce::ObjCClass<NSView>::addMethod<signed char>' requested here
340 | void addMethod (SEL selector, Fn callbackFn) { addMethod (selector, toFnPtr (callbackFn)); }
| ^
In file included from /path/to/project/_deps/juce-src/modules/juce_audio_processors/juce_audio_processors.mm:35:
/path/to/project/_deps/juce-src/modules/juce_audio_processors/juce_audio_processors.cpp:175:13: note: in instantiation of function template specialization 'juce::ObjCClass<NSView>::addMethod<(lambda at /path/to/project/_deps/juce-src/modules/juce_audio_processors/juce_audio_processors.cpp:175:46)>' requested here
175 | addMethod (@selector (isOpaque), [] (id, SEL) { return YES; });
| ^
In file included from /path/to/project/_deps/juce-src/modules/juce_audio_processors/juce_audio_processors.mm:35:
In file included from /path/to/project/_deps/juce-src/modules/juce_audio_processors/juce_audio_processors.cpp:50:
In file included from /path/to/project/_deps/juce-src/modules/juce_audio_processors/juce_audio_processors.h:66:
In file included from /path/to/project/_deps/juce-src/modules/juce_gui_basics/juce_gui_basics.h:68:
In file included from /path/to/project/_deps/juce-src/modules/juce_graphics/juce_graphics.h:67:
In file included from /path/to/project/_deps/juce-src/modules/juce_core/juce_core.h:379:
There’s also something that looks suspicious. juce_AudioSampleBuffer.h is included in juce_audio_basics.h, which unconditionally includes juce_core.h, which unconditionally includes <type_traits> through juce_StandardHeader.h.
So type_traits should already be included, I don’t understand how that can be fixing the problem. Did you try to delete and regenerate the CMake project after updating Xcode?
I’m working on a minimal example right now and will post it if and when I can isolate it out of our code base. My post was mainly just to help anyone else who was in this situation upgrading from 16.2 where it doesn’t happen to us.