STL and "function try blocks"



Hallo

the following code does not compile (VC 7.1):

#include <vector>

int testTry() try{
std::vector<int> *x = new std::vector<int>;
delete x;
return 0;
}catch (...) {
return 0;
}

int main(){
return 0;
}


d:\tmp\trytst\trytst\trytst.cpp(11) : warning C4091: '' : ignored on left of
'int' when no variable is declared
d:\tmp\trytst\trytst\trytst.cpp(11) : error C2143: syntax error : missing
';' before 'inline function header'

Does any one understand why it compiles if I delete the "delete x;"
statement?

thanks
Babak


.