With the migration to C++11, I’ve noticed that the override
keyword was added to various methods in the engine (github.com/urho3d/Urho3D/pull/2108). Even for methods that don’t override anything. Which is weird, because the engine compiles just fine within its own the build system. But as soon as you try the same thing outside of that, you get compile-time errors like error: 'virtual bool Urho3D::Example::Dummy(...)' marked 'override', but does not override
.
The simplest one I would encounter:
struct btVector3;
class Component {
public:
virtual ~Component();
};
class PhysicsWorld : public Component {
public:
virtual ~PhysicsWorld() override;
virtual bool isVisible(const btVector3& aabbMin, const btVector3& aabbMax) override;
};
Seen in action here: https://godbolt.org/g/rTNmb4
Is there a particular flag applied to the compiler that I’m not aware of? I wasn’t able to find anything about this.