Reputation: 22678
MSVS 2015 tries to be helpful and evaluate the value of preprocessor constants in conditionals, e.g. if it thinks that FOO
is not defined, it greys out all the code inside it:
#ifdef FOO
... everything here is greyed out ...
#endif
Unfortunately, at least for the projects I'm working with, it almost always gets the value of FOO
wrong meaning that almost the entire contents of the file is greyed out which is quite annoying as it seriously harms readability.
I don't blame the IDE for getting the value wrong, as it's defined in quite a tortuous way, but I'd really love to have a way to just disable this feature entirely and tell it not to bother with it. Would anyone know of a way to do it?
Upvotes: 0
Views: 67
Reputation: 27880
In Visual Studio 2015 options, set Text Editor - C/C++ - View - Show Inactive Blocks to False.
Upvotes: 1