On Thursday, 8 September 2016 at 11:40:17 UTC, Russel Winder wrote:
Is the fact that:

    void f() nothrow {
            assert(1 == 0);
    }

    int main() {
            f();
            return 0;
    }

compiles fine but at run time f does indeed throw an exception what should happen? If it is what does nothrow actually mean?

f() is nothrow because assert() throws an "AssertError" not an "Exception". Since Error descendants are not recoverable the program usually crashes.

Reply via email to