2

Current version (2022-03 (4.23.0)) of Eclipse CDT indexer does not recognize new features which are included in C++20 and above, like Concepts.

This results in:

  • Not being able to view the keywords (and possibly other parts) of those features in highlighted mode.
  • While the compiler is OK with those features, Eclipse editor identify them as syntax errors where ever they are defined/declared and also mark them as errors (with a red line under them) where ever they are used

This is a similar question to Eclipse CDT Indexer does not fully recognize c++11

and Eclipse CDT indexer does not know C++11 containers

How ever the version of C++ is different and I have tested all of the suggestions in the answers for those questions and none of them worked for this particular case.

More over, I am after a more general solution. I also remember having a similar issue with a new C++ feature in an older Eclipse version, which was solved with the newer versions of Eclipse.

Considering this lag of conformity with new standards of the language, is there any solution/work-around which could potentially solve the issue from now on?

I also appreciate any solution for this particular case, C++ Constraints and concepts https://en.cppreference.com/w/cpp/language/constraints.

AKL
  • 1,367
  • 7
  • 20
  • Possible duplicate: [Eclipse CDT C++20 Support](https://stackoverflow.com/q/61193397/1678770). CDT seems to be really slow to adopt new features; you're better off using a `clangd` language-server based parsing – Human-Compiler Sep 23 '22 at 18:18
  • @Human-Compiler thanks for the advice and I am already checking clangd out. But the problem is, some times, they gave you a complete SDK for a particular platform which has Eclipse embedded in it. Although even in those cases, it is possible to migrate to a new IDE, not every coworker approves that, specially your boss! – AKL Sep 23 '22 at 18:35
  • 1
    I spent several years working in embedded development, so I definitely understand the pain from that one. Unfortunately I'm not sure that there is any reasonable solution though. CDT has always been slow to adopt newer C++ features, and I can't find any information suggesting they ever implemented `clangd`-assisted parsing. It was these reasons that I eventually made the switch to VS Code years ago, and haven't felt the need to look back since. – Human-Compiler Sep 23 '22 at 23:55
  • @Human-Compiler thanks for the advice and I appreciate it, that the advice comes from a fellow embedded developer with lots of years of experience (most likely much more than my own years of experience). I had decided to switch to Vscode, for a while now. The thing is: -a For some unknown reason, I feel like, I like Eclipse more. -b I am not much sure if this is going to be the last time (even in the span of 2 years) I switch to new IDE. Again, thank you very much for the helpful advice – AKL Sep 24 '22 at 06:43

0 Answers0