How is the C++ exception handling runtime implemented?
问题 I am intrigued by how the C++ exception handling mechanism works. Specifically, where is the exception object stored and how does it propagate through several scopes until it is caught? Is it stored in some global area? Since this could be compiler specific could somebody explain this in the context of the g++ compiler suite? 回答1: Implementations may differ, but there are some basic ideas that follow from requirements. The exception object itself is an object created in one function,