例如:
if (true) try
{
// works as expected with both true and false, but is it legal?
}
catch (...)
{
// ...
}
换句话说,把try语句块放在if条件语句之后是合法的吗?
int main() try {} catch(...){}
也是合法的。 - nwp