override will ensure a member function correctly overrides a member function in a parent class with the same signature and compatible return type. overrides allows to specify the signature of the overridden function so that the overriding function can add more optional parameters or widen the accepted range of values for the existing parameters.
...and to allow rich return type covariance. E.g. the function can return more information than the function it overrides and the extra information is just thrown away if not used.
override
will ensure a member function correctly overrides a member function in a parent class with the same signature and compatible return type.overrides
allows to specify the signature of the overridden function so that the overriding function can add more optional parameters or widen the accepted range of values for the existing parameters.