#include <cassert>
template<class A, class B>
bool f()
{
return true;
}
int main()
{
assert(f<char, int>());
}
给出编译错误:错误:宏“assert”传递了 2 个参数,但只需要 1
导致该错误的原因是什么?是否有解决方法?
实时代码:
最佳答案
关于c++ - 使用assert(f<char, int>()) 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31931366/