Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planning: override vs overrides #35

Open
LB-- opened this issue Nov 2, 2015 · 1 comment
Open

Planning: override vs overrides #35

LB-- opened this issue Nov 2, 2015 · 1 comment
Assignees
Labels

Comments

@LB--
Copy link
Member

LB-- commented Nov 2, 2015

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.

@LB-- LB-- added the planning label Nov 2, 2015
@LB-- LB-- self-assigned this Nov 2, 2015
@LB--
Copy link
Member Author

LB-- commented Jul 13, 2016

...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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant