Macros do not understand the template parameters (more precisely, angle brackets), they just see ,and think that you have provided two different parameters to the macro. You need to add parentheses:
TRAP_EXCEPTION
(
(std::map<MyType, bool> Map;)
)
and the macro needs to be changed:
try \
{ \
try{UNWRAP statement} \
catch(Engine::Exception& e) \
{ \
throw MyException(e.message()); \
} \
}
, , .
( ), :
try \
{ \
try{ __VA_ARGS__ } \
catch(Engine::Exception& e) \
{ \
throw MyException(e.message()); \
} \
}
, , ,
TRAP_EXCEPTION
(
std::map<MyType, bool> Map;
)
.