Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

std::current_exception makes a copy

Language: Editor: Layout:
+ ] Compiler args + ] Show input
Compilation time: 1,36 sec, absolute running time: 1,39 sec, absolute service time: 2,76 sec 
fork 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()