Comma in C/C++ macro
问题 Say we have a macro like this #define FOO(type,name) type name Which we could use like FOO(int, int_var); But not always as simply as that: FOO(std::map<int, int>, map_var); // error: macro "FOO" passed 3 arguments, but takes just 2 Of course we could do: typedef std::map<int, int> map_int_int_t; FOO(map_int_int_t, map_var); // OK which is not very ergonomic. Plus type incompatibilities have to be dealt with. Any idea how to resolve this with macro ? 回答1: Because angle brackets can also