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

[18-20,27] Prefer to use 'override' where appropriate #753

Merged
merged 1 commit into from Jun 22, 2016

Conversation

AlisdairM
Copy link
Contributor

@AlisdairM AlisdairM commented Jun 14, 2016

This patch makes consistent use of the 'override' contextual
keyword for every member function (other than destructors)
that overrides a virtual function in one of its base classes.

In general, this came down to one of three cases:

  1. the 'what' function for an exception class
  2. the allocation functions of a memory resource
  3. the implementation methods of a stream buffer.

As far as I can tell, all other virtual function declarations
in the standard library are intended as customization points
for users, and are not overriden in the standard itself.

This pull request addresses #751

This patch makes consistent use of the 'override' contextual
keyword for every member function (other than destructors)
that overrides a virtual function in one of its base classes.

In general, this came down to one of three cases:
1) the 'what' function for an exception class
2) the allocation functions of a memory resource
3) the implementation methods of a stream buffer.

As far as I can tell, all other virtual function declarations
in the standard library are intended as customization points
for users, and are not overriden in the standard itself.
@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 15, 2016

@AlisdairM: Please revise the commit and PR message; there's a stray closing bracket.

@AlisdairM AlisdairM changed the title [18-20,27] Prefer to use 'override' where appropriate] [18-20,27] Prefer to use 'override' where appropriate Jun 15, 2016
@zygoloid zygoloid merged commit 1b47dd9 into cplusplus:master Jun 22, 2016
@AlisdairM AlisdairM deleted the use_override_through_library branch June 24, 2016 10:21
FrankHB pushed a commit to FrankHB/draft that referenced this pull request Jul 9, 2016
This patch makes consistent use of the 'override' contextual
keyword for every member function (other than destructors)
that overrides a virtual function in one of its base classes.

In general, this came down to one of three cases:
1) the 'what' function for an exception class
2) the allocation functions of a memory resource
3) the implementation methods of a stream buffer.

As far as I can tell, all other virtual function declarations
in the standard library are intended as customization points
for users, and are not overridden in the standard itself.

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

Successfully merging this pull request may close these issues.

None yet

3 participants