diff --git a/include/boost/exception/enable_error_info.hpp b/include/boost/exception/enable_error_info.hpp index 34c3e1a..67adf15 100644 --- a/include/boost/exception/enable_error_info.hpp +++ b/include/boost/exception/enable_error_info.hpp @@ -8,6 +8,7 @@ #include #include +#include // For BOOST_STATIC_CONSTANT. namespace boost @@ -55,12 +56,12 @@ boost typedef error_info_injector type; }; - #if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x582)) +#if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x582)) template struct sizeof_dispatch { - enum e { value=sizeof(dispatch((T*)0)) }; + BOOST_STATIC_CONSTANT(int, value = sizeof(dispatch((T*)0)) ); }; template @@ -80,10 +81,17 @@ boost } template - typename exception_detail::enable_error_info_return_type::type +#if !BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x582)) + typename +#endif + exception_detail::enable_error_info_return_type::type enable_error_info( T const & x ) { - return typename exception_detail::enable_error_info_return_type::type(x); + return +#if !BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x582)) + typename +#endif + exception_detail::enable_error_info_return_type::type(x); } }