Win32: BitTest, BitTestAndComplement, ... <- How to disable this junk?
- by Mordachai
WinNT.h has the following lines in it, in the VS2008 SP1 install:
#define BitTest _bittest
#define BitTestAndComplement _bittestandcomplement
#define BitTestAndSet _bittestandset
#define BitTestAndReset _bittestandreset
#define InterlockedBitTestAndSet _interlockedbittestandset
#define InterlockedBitTestAndReset _interlockedbittestandreset
I have a number of templates that are based on BitTest<()
Does anyone know of a simple way to disable these #defines?
Oftentimes MS does provide a #define XXX symbol which, if defined, will disable some offending portion of their header - e.g. NOMINMAX.
I have been unable to find such a solution to the above problem.
If you share frustration with Microsoft's many dubious choices, the read on. If not, stop here. ;)
Editorializing:
Why couldn't Microsoft just use the
_bittest itself???
Or why couldn't they use BITTEST like every knows you
should - always use all-caps for
macros!
Microsoft is still #defining
things in 2010?! WTF?