I am trying to load an existing pool of c++17 sources into an eclipse (2023.03) project. The style of coding is like the following:
#include <string>
class X {
std::string name;
public:
X(const std::string &n) : name{n} {}
};
It is compilable with gcc with no warnings. However, eclipse complains about 'name' in the initializer list: *Symbol 'name' could not be resolved".
I tried to add -std=c++17 to every entry with cdt compiler which i could find but it does not help:
- c/c++->general->preprocessors->providers
- c/c++->build->discovery.
The issue does not go away. The only way it works if '{n}' are replaced '(n)'. But it means that a lot of code has to change.
What am I missing?