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++
/
RAII
A resource-owning constructor throws after two RAII members finish construction. What is …
from RAII
C++23 (GCC 13.3.0)
intermediate
1 min
A resource-owning constructor throws after two RAII members finish construction. What is destroyed?
The two completed members are destroyed in reverse order, but the incomplete outer object is not.
Only the outer object destructor runs.
Every declared member is destroyed, including members never constructed.
Nothing is destroyed because construction failed.
Check
Ask AI about this kata
Report an error
next kata
What does this program print?
Predict the output
A new version is available
Reload