Can I assert in nothrow functions ?

ponce spam at spam.org
Sat Oct 1 10:07:22 PDT 2011


Question 1:

assert can throw an AssertError in debug mode.
What happens when I mark as nothrow a function with assertions ?
The compiler accept it but I have a bad feeling about it.

Question 2:

When to use nothrow?
- Where one can be sure the code won't throw?
- Where we want the compiler to check the function and callees for 
unwanted throwing?

Thanks.


More information about the Digitalmars-d-learn mailing list