What is nothrow for?
Janice Caron
caron800 at googlemail.com
Sat Apr 26 16:04:00 PDT 2008
On 26/04/2008, Ameer Armaly <ameer.armaly at furman.edu> wrote:
> It seems to me that the compiler could figure out whether or not a function
> throws exceptions and act accordingly;
Without the nothrow keyword, the only way it could do that is by
checking not only the function itself, but the function bodies of all
functions called by the function, and so, recursively, forever.
> I really don't see why it needs to be
> told.
With nothrow, it doesn't have to recurse.
More information about the Digitalmars-d
mailing list