Reputation: 167
I have next code, which throws an error
expected ';' before '(' token
in string with directive "using".
#define D1(Name, ... ) \
class Name##Postfix \
{ \
using A1 = void (*)(__VA_ARGS__); \
};
int main()
{
D1(test, test1);
}
If I change __VA_ARGS__
to int
, then there is no error. I'm using the GCC (g++
) compiler, if it's necessary.
Upvotes: 1
Views: 161
Reputation: 4189
There are 3 problems with your code:
test1
is not a typeusing
as type alias is supported only starting with C++11If you fix these problems, then it compiles fine (gcc 4.9.2).
Upvotes: 3