By getting what you want, you will lose a lot.
Visual C ++ IntelliSense is based on several key presumptions 1. that you want good / useful results. 2. That your current IntelliSense compiler will provide information related to the “configuration” you are currently in.
Since your current configuration has this preprocessor directive, you cannot get results from the #ifndef scope.
The reason makes sense if you are experiencing it. What if the IntelliSense compiler just tried to compile the region you were in, regardless of #ifdef regions? You will get pointless and non-compiled code. This might not be the head or tails of your compiler.
I can imagine a very complex solution, where it does a smaller (new) parsing in the region in which you are located, and only this region is considered part of the compiler. However, there are so many holes in this approach (like nothing in this region declared / defined) that this possible approach will immediately upset you, except for very simple scenarios.
As a rule, it is better to avoid logic in #ifdef areas and instead delegate the use of parameterized compilation to entire functions, so that the front-end compiler interface always compiles these modules, but the linker / optimizer chooses to return the OBJ later.
Hope this helps, Will
source share