I'm trying to create a macro that can be used to generically call CppUnitTestFramework's attributes metadata type. Since the calling convention for each test method is different because it uses the function's name in it I need to do something like this:
#define GetAttributes() CATNAME(CATNAME(CATNAME(__GetMethodMetadata,_),__func__),()))
With the hopes that when this macro is used like this:
...
void someFunction(){
MethodAttributeMetadata* meta = GetAttributes();
...
}
Is processed like this:
...
void someFunction(){
MethodAttributeMetadata* meta = __GetMethodMetadata_someFunction();
...
}
Extra info:
Compiler: Visual Studio Tools 2013 (v120)
Microsoft's macro page: https://msdn.microsoft.com/en-us/library/b0084kay.aspx
Is this something I can do?