LLVM Discussion Forums

How to make clangd use C++20 standard in my vim?

I just want to write Modern C++ in my vim using CoC without warnings and errors because of using C++20 features.

Your compilation database (compile_commands.json or compile_flags.txt) should specify -std=c++20. You’ll also need clangd 10, as clang 10 is the first version that supports most of C++20. (Not all: see https://clang.llvm.org/cxx_status.html)

2 Likes