How to build C++20 in Xcode 12.2

I am having problems including "ranges"
I get: "File not found" error.
The problem seems to be choosing the right C++20 library.
May you provide guide?
I tried both: c2a, c20 and GNU c++20
ranges header does not exist yet, in:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1

you can use gcc 10.2 (from home-brew) which supports it:
/usr/local/Cellar/gcc/10.2.0/include/c++/10.2.0

I have already installed: gcc 10.2 
I have the directory: /usr/local/Cellar/gcc/10.2.0/include/c++/10.2.0
I have the file: ranges in this directory

I added: /usr/local/Cellar/gcc/10.2.0/include/c++/10.2.0. to the header search path too.

Now the question is how to tell xcode to use it!.

for the std library: Should I use. -std=c2a or -std=C20 ?

when I try :
c language Dialect:   gnu20 [-std=gnu++20]
C standard library:   libstdc (GNU c++ standard library)

I get this error:
Include path for libstdc headers not found; pass '-stdlib=libc' on the command line to use the libc++ standard library instead
May you tell me how to configure the settings in XCODE to use gcc 10.2 ?
or give me a command line example to use gcc using the C++ 20 ranges feature?
It may be obvious to you, but not for me.
Should this work for the language dialect?
CLANGCXXLANGUAGE_STANDARD = g++2a
Thank you.

After installing the command line tools for XCODE I was able to compile/link/run successfully from the command line:

gcc-12  -lstdc++  -std=c++20 main.cpp -o main

This is using the GNU c++ compiler.

Now the question is: Is it possible to do the same from within XCODE: I.E. Use the GNU c++ compiler to compile code using C++20 dialect?

Please explain in detail how. (More than just select the C++ dialect: GNU++20 in the build settings, because that does NOT work!)

I get error: No member named 'views' in the namespace 'std::ranges' Thank you.

How to build C++20 in Xcode 12.2
 
 
Q