Which C++ language server are you using? The language server is different from the compiler. None of gcc/g++/clang provides a language server. Likely the toolchain installed together with Visual Studio happened to include a language server, e.g., clangd.