Since this is a Microsoft Visual C++ forums, there may not be the kind of expertise to give a full answer here.
But please clarify what is meant by "not working" and "won't let me do that kind of thing".
In Visual C++, the compiler needs to be set to C++20 mode, and this requires a command line option. This is the /std option.
Looking at the GCC C++ Standards Support in GCC page, this states that -std=c++20 should be used to enable C++20 support, or -std=gnu++20 for C++20 with GNU extensions. Is one of these two options on the compiler command line?