juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
https://juce.com
Other
6.3k stars 1.67k forks source link

[Bug]: Juce 7.0.x doesn't compile with C++23 on AppleClang #1350

Open lkotsonis opened 4 months ago

lkotsonis commented 4 months ago

Detailed steps on how to reproduce the bug

Try building e.g. the DemoRunner using the XCode project and setting the C++ standard to C++23.

What is the expected behaviour?

That compilation of the juce libraries succeeds using C++23.

Operating systems

macOS

What versions of the operating systems?

Sonoma 14.3.1 XCode 15.2

Architectures

ARM

Stacktrace

XCode errors:


/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__memory/unique_ptr.h:63:19: Invalid application of 'sizeof' to an incomplete type 'juce::AccessibilityHandler'

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__memory/unique_ptr.h:63:19: Invalid application of 'sizeof' to an incomplete type 'juce::Drawable'

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

I have not tested against the develop branch

Code of Conduct

lkotsonis commented 4 months ago

I also tested this with 7.0.10.

tarlanahad commented 1 month ago

No solution yet?

lkotsonis commented 1 month ago

No solution yet?

The commits I've seen after 7.0.10 don't seem to tackle anything related to C++23, but also I haven't tried building again using C++23 since then. Did you also get a failure @tarlanahad ?

Anthony-Nicholls commented 1 month ago

Thanks we're aware of the issue but we're working on JUCE 8 first. Unfortunately to fix builds for C++23 we'll need to make changes in areas that have been heavily modified in JUCE 8 which is why we haven't tackled this yet.

Sorry for any inconvenience caused and thanks for your patience.

tarlanahad commented 1 month ago

@lkotsonis , yes, I'm getting failure mainly because of not fully defined unique_ptr, which C++ 23 strictly requires.

I hope you can solve this, @Anthony-Nicholls , we will be looking forward to using JUCE with C++ 23. Thanks for the prompt response.

swarturs commented 1 week ago

Any news regarding this C++23 issue, still not buildable it seems?