Daniel Murphy:
> Allocations are allowed inside nothrow functions.  If I remember correctly, 
> the reasons are that disallowing them would limit usefulness, and that 
> OutOfMemoryError is not generally recoverable.<

OK. Then can you tell me why the following program produces:
test2.d(1): Error: function test2.foo 'foo' is nothrow yet may throw

nothrow void foo() {
    auto a = new int[5];
}
void main() {}

Bye,
bearophile

Reply via email to