为了整洁,我#undef
想要windows.h
.
例如:
namespace os_stuff
{
#include <windows.h>
// ARGH! Macros everywhere!
// at least I can keep the rest of the API in here
}
// include a bunch of files here that use the Windows API through os_stuff
namespace os_stuff
{
#include <unwindows.h> // <- #undefs all that was #defined in windows.h
}
// All clean, as though windows.h was never here. Though os_stuff, used nowhere else,
// still has all of the API declarations in it (which is OK).