"Monster" <mo*****@this.monster@that> wrote in message
news:hp********************@giganews.com
Are they expensive because of what happens when an exception is
thrown or because of the extra checking involved when you wrap
exceptions around code?
This is implementation-specific. According to Stroustrup (TC++PL, p. 381),
"In principle, exception handling can be implemented so that there is no
run-time overhead when no exception is thrown." However, it is known, for
example, that VC++ exception handling does have a run-time cost even when no
exception is thrown. This cost is only small so can be ignored for most
purposes.
--
John Carson
1. To reply to email address, remove donald
2. Don't reply to email address (post here instead)