|
Boost : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-08-09 11:35:02
How about...
namespace boost {
struct exception_throw_policy
{
template <class E> void handle_exception(E const & e)
{
throw e;
}
};
struct exception_assert_policy
{
template <class E> void handle_exception(E const & e)
{
//...
}
};
template <class E> void throw_exception(E const & e)
{
typename exception_policy;
exception_policy::handle_exception(e);
}
}
#ifndef BOOST_NO_EXCEPTIONS
namespace boost {
typedef exception_throw_policy exception_policy;
}
#endif
It would be up the user to add someplace:
namespace boost {
typedef exception_assert_policy exception_policy;
}
If that's what they want.
-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk