
8 Dec
2005
8 Dec
'05
3:48 p.m.
Thorsten Ottosen wrote:
is this necessary? after all, I think most function bodies would look like
{ if( foo() ) boost::throw_exception( ... ) ... // normal code here }
Consider this: int process(int d) { switch (d) { case 0: return process_0(); default: THROW("unexpected argument"); } } As long as THROW maps to 'throw' all is fine, but for anything else the compiler might find that you fall through the switch block and thus issues a 'missing return statement' warning/error. Regards, Stefan