I have this serious problem. I have an enumeration within 2 namespaces like this :
namespace FANLib {
namespace ERROR {
enum TYPE {
/// FSL error codes
FSL_PARSER_FILE_IERROR,...
and somewhere else in my code, I use it like this :
FANLib::Log::internalLog(FSLParser::FILE_IERROR, file_ierror, true, FANLib::ERROR::FSL_PARSER_FILE_IERROR);
All compiles fine and well, but if I happen to include "windows.h", I get errors! The problem is in "WinGDI.h" which has this line :
#define ERROR 0
and makes the compiler think that, after FANLib::..., there is a zero! The error I get is :
Error 1 error C2589: 'constant' : illegal token on right side of '::'
Error 2 error C2059: syntax error : '::'
Error 3 error C2039: 'FSL_PARSER_FILE_IERROR' : is not a member of '`global namespace''
Argh!? Is there anything I can do about this, without having to change my namespaces due to some thoughtless #define? I have read in another post that I could #undef ERROR, but how safe is that?
Many thanks in advance.