Skip to content

关于普通重载和override的一个区别 #264

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

Closed
lingkerio opened this issue May 6, 2023 · 1 comment · Fixed by #265
Closed

关于普通重载和override的一个区别 #264

lingkerio opened this issue May 6, 2023 · 1 comment · Fixed by #265

Comments

@lingkerio
Copy link
Contributor

实际描述

  • 文件路径:book/zh-cn/02-usability.md
  • 原文段落:
override
当重载虚函数时,引入 override 关键字将显式的告知编译器进行重载,编译器将检查基函数是否存在这样的虚函数,否则将无法通过编译

预期描述

override
当重载虚函数时,引入 override 关键字将显式的告知编译器进行重载,编译器将检查基函数是否存在这样的函数签名一致的虚函数,否则将无法通过编译

附图

image

@changkun
Copy link
Owner

changkun commented May 6, 2023

PR welcome

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 a pull request may close this issue.

2 participants