Grid in Xcode

Hi

I’m trying to use the new Grid layout on Xcode (iOS) but I can’t seem to get it to work (using latest 5.2.0 version of JUCE). It comes up with the error “Variable has incomplete type”.

I tried putting in #if JUCE_HAS_CONSTEXPR as in the demo but that comes out as false. I don’t think it’s working for me in the JUCE demo either.

Any help appreciated!
Matt

i ran into the same problem with xcode 9 compiling for mac. i hacked my way around it by removing #if __has_feature(cxx_relaxed_constexpr) and the the matching #endif around #define JUCE_HAS_CONSTEXPR 1 in modules/juce_core/system/juce_CompilerSupport.h

That works, thanks!

JUCE_HAS_CONSTEXPR will be set if you are using C++14 or above, which you can do by changing this project setting:

I’ll change the JUCE Demo to use C++14 by default so the Grid demo will be available.

1 Like