Because the trace value is copied using a copy constructor, it will have two calls on the destructor. The first is at the end of f, the second at the end of the main program.

Entering main

Entering f

Exiting main

Exiting main