Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-04-30 23:28:37


"Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> writes:

> I would like to ask someone with write access to CVS to create file
> boost/details/exception_helpers.hpp (or so) with content:
>
> #include <boost/config.hpp>
> #include <boost/detail/workaround.hpp>
>
> #if !(defined BOOST_NO_EXCEPTIONS)
> # define BOOST_TRY { try
> # define BOOST_CATCH(x) catch(x)
> # define BOOST_RETHROW throw;
> # define BOOST_CATCH_END }
> #else
> # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
> # define BOOST_TRY { if ("")
> # define BOOST_CATCH(x) else if (!"")
> # else
> # define BOOST_TRY { if (true)
> # define BOOST_CATCH else if (false)
> # endif
> # define BOOST_RETHROW
> # define BOOST_CATCH_END }
> #endif
>
> circular_buffer, serialization and multi_index_container may use this code.
>
> It was discussed on the list and reaction was rather positive.

When someone checks in a library using that code, they can factor it
out and put it in the detail directory.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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