Author |
Topic |
|
vvv444
New Member
2 Posts |
Posted - Sep 12 2013 : 08:31:02 AM
|
Hi,
I have a Win32 Makefile project that uses the gcc compiler (it has full support for C++11). Thus, gcc defines __cplusplus macro to be "201103L" for my code. I wanted to "tell" that to Visual Assist.
For some other macro __Foo it works fine, I define the macro in project settings:
and the code is correctly parsed:
(note that the correct part was grayed out)
However, this does not work for __cplusplus macro. Even when it is defined as __cplusplus=201103L in project settings, the parser of Visual Assist still thinks it is "199711L".
Looking forward for your assistance.
Best, Vasili |
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Sep 13 2013 : 7:25:22 PM
|
The graying out part itself is a Visual Studio feature, and you can control it via the following option:
Tools -> Options... -> Text Editor -> C/C++ -> Formatting -> Show Inactive Blocks
Or does this cause other problems as well or just the coloring?
|
|
|
vvv444
New Member
2 Posts |
Posted - Sep 15 2013 : 04:23:04 AM
|
Hi,
The graying out is not the problem, on the contrary, it is useful and I do want it to work. The problem is that it grays out the wrong part (because uses wrong value of __cplusplus variable).
However, the more serious problem is that it also starts parsing the wrong code and generates IntelliSense errors for the wrong code (that should have been grayed).
For example if I write:
#if __cplusplus < 201103L #error "Foo" #endif
IntelliSense will generate the Foo error in Error List window.
In any case, is there any way Visual Assist can help me with this or all this functionality is implemented solely by VS?
Best, Vasili |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Sep 16 2013 : 4:50:18 PM
|
Yes. That was my point. Both of these features are solely VS features, and we cannot fix them, unfortunately. |
|
|
|
Topic |
|