Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

std::current_exception makes a copy

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 1,36 sec, absolute running time: 1,39 sec, absolute service time: 2,76 sec 
edit mode |  history  | discussion
Now throwing Widget...
constructing the exception object of type Widget on the stack
Found the catch handler.
Now calling current_exception...
copying the Widget object from the stack to the heap
destroying a Widget object
Now setting ex to nullptr...
destroying a Widget object
Now exiting main()