I get the error in the title on two of my templates. Both have similar declarations and definitions as follows:
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)();
    }
}
I don't understand why I am getting this error on these. Anyone have and idea?
Thanks, Bear
You are missing the return type of the function parameter of the second function.
template <typename T1, typename T2>
void EncoderPrivate::setVideoCodecOption(T1 AVCodecContext::*option, (CR2CVideoCodecSettings::*f)() const)
Should be
template <typename T1, typename T2>
void EncoderPrivate::setVideoCodecOption(T1 AVCodecContext::*option, T2 (CR2CVideoCodecSettings::*f)() const)
                                                                     ^^^added return type
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With