emacs-lsp / emacs-ccls

Emacs client for ccls, a C/C++ language server
200 stars 29 forks source link

c++17, std::optional #100

Open lromor opened 4 years ago

lromor commented 4 years ago

Hi,

I'm testing ccls on a c++17 project. I wrote the following:

clang++
-std=c++2a

in the .ccls.

The include file #include <optional> is correctly found and autocompleted, but for some reason I'm unable to access the optional object in the namespace (no member named optional in the namespace std).

Notice that I can manually call clang++ with those options and compiles without errors.

Any ideas on how to solve this?

lromor commented 4 years ago

I'm using a fresh doom emacs. I tested if my .ccls was picked up at all using a macro definition, and it seems it's not. I guess the issue is that the .ccls is not read. Is there a way to debug this? I can't really understand how to run diagnostic on this problem.