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++
/
Exceptions
A constructor throws after two data members finished construction. Which destructors run?
from Exceptions
C++23 (GCC 13.3.0)
intermediate
1 min
A constructor throws after two data members finished construction. Which destructors run?
The two completed members are destroyed in reverse order; the incomplete outer object is not.
Only the outer object destructor runs.
All declared members are destroyed, including members whose construction never began.
No destructors run because construction failed.
Check
Ask AI about this kata
Report an error
next kata
What happens when an exception tries to leave a noexcept function?
Quiz
A new version is available
Reload