Archlinux user using Emacs as a C++ IDE with the following setup : company / flycheck / lsp-ui / ccls
I'm trying to use filesystem
library from c++17 for personal use but I can't get rid of this error in Emacs
ccls : no member named 'filesystem' in namespace 'std'
A quick sample of my problem
#include <iostream>
#include <filesystem>
int main(int argc, char** argv) {
std::filesystem::path filePath("./sample.cpp");
std::cout << filePath.filename() < std::endl;
return 0;
}
Compilation and runtime are totally fine using this command :
clang++ -std=c++17 sample.cpp
Output : "sample.cpp"
But the "error" is still present inside Emacs which is kind of annoying. I tried to add .ccls
file with the following content but that doesn't solve the problem.
clang++
%cpp -std=c++17 ; Also tried with gnu++17
Here a screenshot of the problem. Error with cout
and filePath
are consequences of the first one I guess because everything is good in general
Does anybody know how to solve the problem ?