I know it seems odd, and indeed it is and I would never do it, but I am just curious:
1 2 3 4 5
try
{
throw;
}
//How do I catch that?
It is valid C++ and compiles fine, and even runs fine, throwing an exception and terminating because it doesn't get caught. But my questions is, how do I catch a thrown exception that didn't throw any value, as in the above code? Just a curiosity. ;)