diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index 4be5557..e01c517 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -32,6 +32,15 @@ # define BOOST_FUNCTION_TARGET_FIX(x) #endif // not MSVC +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 +// Work around a compiler bug. +// boost::python::detail::function has to be seen by the compiler before the +// boost::function class template. +namespace boost { namespace python { namespace detail { + class function; +}}} +#endif + #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace boost { diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 8cb0151..1a03093 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -514,7 +514,7 @@ namespace boost { f1.swap(f2); } -#if !defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) #if BOOST_FUNCTION_NUM_ARGS == 0 #define BOOST_FUNCTION_PARTIAL_SPEC R (void)