JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

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

Open lkotsonis opened this issue 1 year ago • 6 comments

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

  • [X] I agree to follow the Code of Conduct

lkotsonis avatar Feb 12 '24 08:02 lkotsonis

I also tested this with 7.0.10.

lkotsonis avatar Feb 14 '24 08:02 lkotsonis

No solution yet?

tarlanahad avatar May 07 '24 15:05 tarlanahad

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 ?

lkotsonis avatar May 07 '24 15:05 lkotsonis

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.

Anthony-Nicholls avatar May 07 '24 16:05 Anthony-Nicholls

@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.

tarlanahad avatar May 07 '24 16:05 tarlanahad

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

ghost avatar Jun 25 '24 13:06 ghost