5
我在兩個模板的標題中出現錯誤。兩者都有類似的聲明和定義如下:錯誤:C2988:無法識別模板聲明/定義
template <typename T1, typename T2> void setVideoCodecOption(T1 AVCodecContext::*option, T2 (CR2CVideoCodecSettings::*f)() const);
template <typename T1, typename T2>
void EncoderPrivate::setVideoCodecOption(T1 AVCodecContext::*option, (CR2CVideoCodecSettings::*f)() const)
{
T2 value = (m_videoSettings.*f)();
if (value != -1) {
m_videoCodecContext->*option = (m_videoSettings.*f)();
}
}
我不明白爲什麼我得到這些錯誤。任何人都有想法?
感謝, 熊