struct Base
{
virtual void Func(float f) = 0;
virtual ~Base() = default; // to silence warnings
};
template <typename T>
struct Derived : Base
{
void Func(T f) override {} // will fail to compile if not overriding
};
int main()
{
Derived<float> d;
d.Func(0);
return 0;
}
c3RydWN0IEJhc2UKewogICB2aXJ0dWFsIHZvaWQgRnVuYyhmbG9hdCBmKSA9IDA7CiAgIHZpcnR1YWwgfkJhc2UoKSA9IGRlZmF1bHQ7IC8vIHRvIHNpbGVuY2Ugd2FybmluZ3MKfTsKCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgpzdHJ1Y3QgRGVyaXZlZCA6IEJhc2UKewogICB2b2lkIEZ1bmMoVCBmKSBvdmVycmlkZSB7fSAvLyB3aWxsIGZhaWwgdG8gY29tcGlsZSBpZiBub3Qgb3ZlcnJpZGluZwp9OwoKaW50IG1haW4oKQp7CiAgIERlcml2ZWQ8ZmxvYXQ+IGQ7CiAgIGQuRnVuYygwKTsKICAgcmV0dXJuIDA7Cn0=