2 Replies
      Latest reply on May 2, 2020 9:10 AM by pjd
      pjd Level 1 Level 1 (0 points)

        Does anyone know how to enable the current Clang C++20 feature support in Xcode 11.4.1?

         

        Neither C++2a, nor C++20 appear to be an option in the project's Apple Clang - Language - C++ settings for C++ Language Dialect.

        • Re: C++20 in Xcode 11.4.1?
          jonprescott Level 3 Level 3 (100 points)

          I use a config file (.xcconfig), and set the build setting CLANG_CXX_LANGUAGE_STANDARD = c++2a.  Look at the config file support in the Xcode help to figure out how to use a config file.

            • Re: C++20 in Xcode 11.4.1?
              pjd Level 1 Level 1 (0 points)

              FYI, just discovered that you can go into the C++ Language Dialect setting under Build Settings, select Other.. then type c++2a and press Enter.

               

              Tested with new string functions starts_with/ends_with from C++20 and the program compiled/ran.