Boost logo

Boost :

From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2004-03-01 08:58:37


Guillaume Melquiond <guillaume.melquiond_at_[hidden]> writes:

| No, you get the dangling-else problem back. It's why I was suggesting a
| BOOST_TRY_END to correctly close the "if" (for example, "else {}")

I see.

if (foo())
   try {
   } catch (X) {
   } catch (Y) {
   }
else
   bar();

is the problem...

I do not see any other solution than another macro or requiring to but
the try/catch in a block.

if (foo())
   { BOOST_TRY {
     } BOOST_CATCH(X) {
     } BOOST_CATCH(Y) {
     }
   }
else
   bar();

-- 
	Lgb

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk