Dear all,
here's a few parts of a program I'm working at. It does compile, and it does work as expected. Anyway Eclipse Kepler marks one line as a bug with the remark Field 'befehl' could not be resolved.
The bug sign didn't show up when both classes were in one file.
ScriptInterpreter maintains and processes a vector of Objects, initialised with example data. An iterator of the vector keeps track of the current position while various methods process the data. I've copied the relevant lines only.
I can live with a few wrongly bug-marked lines in Eclipse. What I don't want is any hidden errors that express at some time later.
Is there anything wrong with the code? Anything that's not recommended and compiles anyway? Is anything c++11-specific about the questionable line?
Ignore IDE/Intellisense "bug signs". The only thing that matters is whether or not you get a compiler warning/error when you build.
Do you? If so, post the error message. If not, don't worry about it (and/or turn off that feature in your IDE, since it's apparently flakey and unreliable).
EDIT: to clarify....
IDE 'bug signs' are there to help you spot compiler errors before you actually compile. They do not spot logic errors.
So I can't say whether or not the code you wrote will work as you expect (neither can your IDE).
Thank you for the reassurance, Disch.
The compiler does not complain about anything I'm doing in that part of the code. The excerpts are taken from working code that does exactly what it's meant to do.
If nobody contradicts, I'll stick to your advice and trust the compiler rather than the IDE.
Intellisense is something difficult for IDEs to get right, and often it can get confused very easily and seemingly for no reason. If the IDE's intellisense can't figure out how to understand your code, but the compiler can, just turn it off for that specific project.