我正在尝试显式实例化可变参数构造函数。这个打印所有参数的最小示例导致我在带有 GCC 5.3 的 64 位 Win 7 上的 MinGW-w64 上看到的相同错误。
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*);