Error when including "llvm/ADT/APFloat.h" in Kaleidoscope

Hi, everyone.
I’m learning Kaleidoscope following the tutorial. Now i’m in the chapter 3.
When including the header file described in the question title, i met the following error:

I’m a beginner and i want to know how to fix the error.
I use WSL and Ubuntu-22.04.The llvm version is 17.0.0git.

std::is_integral_v is C++17, make sure you have that available and enabled.

I can compile successfully, but my VS Code still shows errors. I want to know why. I compile it by the command in the tutorial. Thank you !

Then go read the documentation for VS Code so you can configure it to enable C++17 for whatever compiler it’s using.

I use clang and clangd:

I modify some files(c_cpp_properties.json and settings.json):


The same issue still persists. And there is another problem:

Mixing versions like that sounds like a bad idea. It wouldn’t surprise me if using a clangd newer than 14 that was closer (the same as) your clang binary in /usr/local/bin fixed your issue. But I don’t know anything about VS Code settings, so for all I know you could just be editing the wrong thing.