我正在尝试explicitly instantiate a variadic构造器。这个print all arguments的最小示例导致了我在64位Win7上的MinGW-w64上看到的相同错误,使用的是GCC 5.3。
struct stf {
template<typename... Args> stf(Args&&... args){
using expand_type = int[];
expand_type{(print(args), 0)... };
}
};
//error on next line:
//template-id 'stf<char*, char*>' for 'stf::stf(char*, char*)'
//does not match any template declaration
template stf::stf<char*,char*>(char*,char*);https://stackoverflow.com/questions/41371435
复制相似问题