Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
type_info, vtable
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Ivan Vecerina, post: 1455230"] | Ivan Vecerina wrote: | | > This data structure is used to implement Run-Time Type Identification | > (RTTI), a feature which is required for exception handling, | | RTTI isn't need for exception handling, neither would it be sufficient. I did not claim it was sufficient. But RTTI is needed to match catch handlers with exceptions. Consider: #include <vector> #include <string> #include <iostream> #include <exception> int main() { try { std::vector<std::string> tooBig(1UL<<31,"just some string"); } catch(std::exception& x) { std::cerr << "Failure: "<<x.what()<<std::endl; } } How would the C++ run-time handle a failure of this memory allocation without RTTI? Regards, Ivan [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
type_info, vtable
Top