I am just testing the LSP-ccls in Emacs. Emacs gave me this mysterious error, but the code is indeed runnable. Does anyone know why this is happening?
#include <iostream>
using namespace std;
int main() {
for (auto i = 0; i < 5; i++) {
cout << i << endl;
}
return 0;
}
Error on line 6, endl
:
reference to overloaded function could not be resolved; did you mean to call it?
My emacs configuration is
(use-package ccls
:ensure t
:config
(setq ccls-executable "ccls")
(setq lsp-prefer-flymake nil)
(setq-default flycheck-disabled-checkers '(c/c++-clang c/c++-cppcheck c/c++-gcc))
:hook ((c-mode c++-mode objc-mode) .
(lambda () (require 'ccls) (lsp-deferred))))