0
我想:
#define Some(p1, p2) _Some(p1, p2, __FILE__, __func__, __LINE__)
Some _Some(int p1, int p2, const char* file, const char* func, int line) { ... }
但:
some.hpp:16:12: error: macro "Some" requires 3 arguments, but only 1 given
~Some();
^
some.hpp:16:5: error: invalid use of destructor ‘~Some’ as a type
~Some();
^
你能告诉我们从'0'行到''some.hpp'行'20'的整个代码吗? – Shoe
你的宏名称与别的东西冲突。这就是为什么宏名称传统上使用SHOUTY_CAPS。 –