I am building the following code (I can only give a snippet here), and I am seeing the error I show after the code snippet. The code builds fine with the MS VS 2005.
I am assuming this code violates something in the C++ standard. I have been trying to reproduce the error by rewriting the line that throws the error without using the typedefs. I cannot seem to reproduce this. I expect I do not understand the typedefs well enough.
Can anyone help?
Here is the code:
// From included code:
typedef long (EventHandler::*EventHandlerFunc)(void *);
struct COMMON_EXPORT_CLASS EventID
EventID(unsigned int i_code, EventHandlerFunc i_func);
unsigned int d_code;
typedef long (VelocityManager::*Localhandler)(void*);
EventProc_NS::EventID g_events_VelocityManager =
// What does this expand to because of the typedefs above?
// I cannot recreate it without the typedefs.
// **** The following line throws the error:
EventProc_NS::EventID(0, 0) //sentinel
Here is the error the Intel compiler throws:
1>Compiling with Intel C++ Compiler 11.1.068 [IA-32]... (Intel C++ Environment)
1>Intel C++ Compiler for applications running on IA-32, Version 11.1 Build 20090930 Package ID: composer_update2_revised.068
1>Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
1>.\VelocityManager_mini_version.cpp(103): internal error: type_pointed_to: not a pointer type
1> EventProc_NS::EventID g_events_VelocityManager =
1>compilation aborted for .\VelocityManager_mini_version.cpp (code 4)
-- end --