Both enable_error_info.hpp and enable_current_exception.hpp now do not depend on intrusive_ptr or any other Boost lib.

[SVN r48482]
This commit is contained in:
Emil Dotchevski
2008-08-31 01:39:00 +00:00
parent f2b14ffa98
commit f12d40765b
9 changed files with 200 additions and 58 deletions

View File

@ -7,8 +7,6 @@
#define UUID_0C5D492E909711DCB658AD4556D89593
#include <boost/exception/exception.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/config.hpp>
#include <stddef.h>
namespace
@ -57,43 +55,21 @@ boost
typedef error_info_injector<T> type;
};
#if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x582))
template <class T>
struct
sizeof_dispatch
{
BOOST_STATIC_CONSTANT(int, value = sizeof(dispatch((T*)0)) );
};
template <class T>
struct
enable_error_info_return_type
{
typedef typename enable_error_info_helper<T,sizeof_dispatch<T>::value>::type type;
};
#else
template <class T>
struct
enable_error_info_return_type
{
typedef typename enable_error_info_helper<T,sizeof(dispatch((T*)0))>::type type;
};
#endif
}
template <class T>
inline
#if !BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x582))
typename
#endif
exception_detail::enable_error_info_return_type<T>::type
enable_error_info( T const & x )
{
return
#if !BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x582))
typename
#endif
exception_detail::enable_error_info_return_type<T>::type(x);
return typename exception_detail::enable_error_info_return_type<T>::type(x);
}
}