I noticed that on line 56 in include/omnetpp/simkerneldefs.h, the namespacing for cRuntimeError is missing:
((void) ((expr) ? 0 : (throw cRuntimeError("ASSERT: condition %s false in function %s, %s line %d", \
This should read:
((void) ((expr) ? 0 : (throw omnetpp::cRuntimeError("ASSERT: condition %s false in function %s, %s line %d", \
Such that when other namespaced stuff uses this code, things work properly.
In particular, this fixes the following compile error for veins (4a2) against the new OMNeT++ beta:
veins/modules/mobility/traci/TraCIBuffer.cc
In file included from /home/namnatulco/simulation/omnetpp/include/omnetpp/cexception.h:22:0,
from ./veins/modules/mobility/traci/TraCIBuffer.h:7,
from veins/modules/mobility/traci/TraCIBuffer.cc:1:
veins/modules/mobility/traci/TraCIBuffer.cc: In member function ‘T Veins::TraCIBuffer::read() [with T = Veins::TraCICoord]’:
/home/namnatulco/simulation/omnetpp/include/omnetpp/simkerneldefs.h:57:75: error: ‘cRuntimeError’ was not declared in this scope
#expr, __FUNCTION__, __FILE__, __LINE__), 0)))
^
veins/modules/mobility/traci/TraCIBuffer.cc:69:2: note: in expansion of macro ‘ASSERT’
ASSERT(posType == POSITION_2D);
^
/home/namnatulco/simulation/omnetpp/include/omnetpp/simkerneldefs.h:57:75: note: suggested alternative:
#expr, __FUNCTION__, __FILE__, __LINE__), 0)))
^
veins/modules/mobility/traci/TraCIBuffer.cc:69:2: note: in expansion of macro ‘ASSERT’
ASSERT(posType == POSITION_2D);
^
In file included from ./veins/modules/mobility/traci/TraCIBuffer.h:7:0,
from veins/modules/mobility/traci/TraCIBuffer.cc:1:
/home/namnatulco/simulation/omnetpp/include/omnetpp/cexception.h:267:15: note: ‘omnetpp::cRuntimeError’
class SIM_API cRuntimeError : public cException
^
Makefile:165: recipe for target '../out/gcc-debug//src/veins/modules/mobility/traci/TraCIBuffer.o' failed
make[1]: *** [../out/gcc-debug//src/veins/modules/mobility/traci/TraCIBuffer.o] Error 1