Whim:
In a language to write C + + plug-in, can replace the macro definition,
You can do this by adding specific tags to C + +, such as <javascript></javascript>
The middle code can be translated into C + + code and compiled with the C + + compiler.
Bothered:
1.c++ macro must be anti-slash, and then need a lot of repetitive logic code, the need for macros to reduce the amount of code, to achieve efficient work;
2. If there is a large number of macro code in C + +, it is a bit hard to solve the macro code, so if you can restore the code directly;
The ultimate goal: to reduce the confusion caused by the macro definition of C + +, reduce the number of repetitive code, you can achieve the seemingly callback code, in fact, similar to define after the restoration of the code inside the C + + file.
You can use LUA or JavaScript or go. But it doesn't have to be too complicated.
function has the effect of helping the compiler to work efficiently.
WHIM-Outlaw macro definition, use another language to do part of the outer package of C + +