• Advertisement
Sign in to follow this  

Is it possible to declare a macro and have Intellisense ignores it ?

This topic is 667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to use the module features introduced in VS2015 and which was unfortunatly rejected for inclusion in C++17 but
is still a TS.
Basically module adds an "import" mechanism in C++ that replaces includes and should heavily speeds up build time.

Unfortunatly while CL is able to produce and consume and module, Visual Studio 2015 doesn't support it.
Luckily adding some flags to the CL command line is easy and I'm able to use module inside my project.

The issue is that intellisense doesn't recognise the "import" directive and can't import module binary data at the moment.
This means that I'm getting wrong color syntaxing which is annoying.
For compatibility with others compilers I wrapped the import directive inside an #ifdef MODULE_ENABLED and I wonder if
it is possible to make Intellisense parse without this define and still have it enabled when building ? Currently it looks
like intellisense is picking the same defines as the one used in vcxproj.

Share this post


Link to post
Share on other sites
Advertisement

Yes, sometimes it happens.  While Intellisense is pretty good on some projects, it has a history of being quite terrible on large projects like games.

 

MSDN documents the few options. If it isn't there, consider using different tools like Visual Assist or CodeRush. Both have free trials.

Share this post


Link to post
Share on other sites
Unfortunately the feature seems very buggy, I'm getting lot of compiler crashes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement