| title | C26434 | |
|---|---|---|
| ms.date | 11/15/2017 | |
| ms.topic | conceptual | |
| f1_keywords |
|
|
| helpviewer_keywords |
|
|
| ms.assetid | 7f66477f-da66-444a-a6e3-44513d7d7e31 |
"Function hides a non-virtual function."
C.128: Virtual functions should specify exactly one of virtual, override, or final
Introducing a function which has the same name as a non-virtual function in a base class is like introducing a variable name which conflicts with a name from outer scope. Furthermore, if signatures of functions mismatch, the intended overriding may turn into overloading. Overall, name hiding is dangerous and error-prone.
- Only non-overriding functions in current class are checked.
- Only non-virtual functions of base classes are considered.
- No signature matching is performed. Warnings are emitted if unqualified names match.
C.128: Virtual functions should specify exactly one of virtual, override, or final