Under Windows, after the line
#include <windows.h>
many symbols become defined in the global namespace. For example, Polygon
gets defined.
Is there then any convenient way to use this symbol to define a custom class as in the following?
class Polygon {
...
};
Does putting class Polygon
in its own namespace imply that it has to be explicitly qualified with that namespace every time it is used? In other words, is there any way to hide or mask particular definitions from windows.h
?
Or is there any other practical workaround?
I thought of:
#define Polygon Polygon_windows
#include <windows.h>
#undef Polygon
but this seems quite ugly.
And of course one cannot use namespace windows { #include <windows.h> }
.