Is there any use case for a pure virtual final method in C++?

58 Views Asked by At
class C
{
    public:
    virtual void f() final = 0;
};

Godbolt

To me this looks like a programming mistake. =0 says it has no implementation yet and must be overriden, but final says that nobody can override it. So it will never have an implementation.

Do I miss something? I wonder that I don't get any warning for above code.

0

There are 0 best solutions below