Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C++
/
Virtual functions
A Base constructor calls a virtual member on *this while constructing a Derived object. W…
from Virtual functions
C++23
intermediate
1 min
A Base constructor calls a virtual member on *this while constructing a Derived object. Where can that call dispatch?
To the final overrider in Base or one of its bases, not to Derived.
Always to Derived because the allocation already has Derived size.
Only to a free function selected by argument-dependent lookup.
The call is always a compile-time error.
Check
Ask AI about this kata
Report an error
next kata
After overload resolution selects a virtual member, what selects the function body for an…
Quiz
A new version is available
Reload