7

Every compiler has a macro like __BORLANDC__ defined that enables the programmer to activate or deactivate certain behaviour or workarounds.

Is such a macro defined while IntelliSense parses files so I can activate workarounds for bugs?

#if defined __INTELLISENSE__
#define SOMETHING
#endif
iFreilicht
  • 13,271
  • 9
  • 43
  • 74
  • 1
    Hey cool, I didn't know you could use `defined` without parentheses. I learn something every day. – Cameron Nov 03 '14 at 22:19
  • 1
    possible duplicate of [Hide a C++ code block from Intellisense](http://stackoverflow.com/questions/6496524/hide-a-c-code-block-from-intellisense) – Mark Taylor Nov 04 '14 at 04:04

1 Answers1

13

Yes. It's called __INTELLISENSE__, as you've guessed.

#ifdef __INTELLISENSE__
// ...
#endif
Vaillancourt
  • 1,380
  • 1
  • 11
  • 42
Cameron
  • 96,106
  • 25
  • 196
  • 225