Win32: BitTest, BitTestAndComplement, ... <- How to disable this junk?
Posted
by Mordachai
on Stack Overflow
See other posts from Stack Overflow
or by Mordachai
Published on 2010-02-09T21:15:07Z
Indexed on
2010/04/25
4:43 UTC
Read the original article
Hit count: 274
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?
© Stack Overflow or respective owner