skip to Main Content

I purchased a book recently entitled beginning C++20. I was looking to begin learning c++ though I now realize that I can’t find a compiler that can run the code in the book as I get an error since the compiler I’m using (xcode) does not support c++ 20. I’m wondering if there are any compilers that I can run on my mac that support c++20.

2

Answers


  1. gcc version 8 and up supports some of C++20; you can try using that.

    It should also be noted that Xcode isn’t a compiler, but instead an IDE that should be using clang as the actual compiler. Clang also currently has support for some of the C++ 20 features. To use them the -std=c++20 flag will still be needed.

    Login or Signup to reply.
  2. Here can you find the currently implemented feature support of the GCC compiler of the C++20 specification:
    GCC Link

    But you need to enable it in your console command or add this to your toolchain: "-std=c++20"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search