Is there a way to configure Eclipse so that it can resolve the following forward declaration example?
This builds without any problems.
class MyClass {
public:
enum class MyEnum; // Forward declaration.
enum class MyOtherEnum {
DELTA,
ECHO,
FOXTROT
};
};
enum class MyClass::MyEnum{
ALPHA,
BRAVO,
CHARLIE
};
int main(void) {
volatile MyClass::MyEnum myVariable = MyClass::MyEnum::BRAVO; // Flags up two semantic errors.
volatile MyClass::MyOtherEnum myOtherVariable = MyClass::MyOtherEnum::ECHO; // No problems.
return 0;
}
Semantic Errors:
Symbol 'BRAVO' could not be resolved.
Type 'MyClass::MyEnum' could not be resolved.
Using Eclipse CDT Mars.2 Release (4.5.2).