R
[rob desbois]
Consider the following code:
try
{
// throws exceptions of several types
Foo();
}
catch (out_of_range& ex)
{ }
catch (exception& ex)
{ }
Given that this requires identification of object type at runtime, how
is this implemented -- does it use RTTI? If so, then why is RTTI
attacked for its overheads given that any exception-based error
handling strategy would involve it. (I know RTTI can also point to poor
design, ignore that.)
If not, then how is this achieved?
TIA,
--rob
try
{
// throws exceptions of several types
Foo();
}
catch (out_of_range& ex)
{ }
catch (exception& ex)
{ }
Given that this requires identification of object type at runtime, how
is this implemented -- does it use RTTI? If so, then why is RTTI
attacked for its overheads given that any exception-based error
handling strategy would involve it. (I know RTTI can also point to poor
design, ignore that.)
If not, then how is this achieved?
TIA,
--rob