Index: function_template.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/function/function_template.hpp,v retrieving revision 1.75 diff -u -r1.75 function_template.hpp --- function_template.hpp 20 Jun 2004 05:32:28 -0000 1.75 +++ function_template.hpp 2 Jul 2004 08:23:29 -0000 @@ -307,6 +307,9 @@ ~BOOST_FUNCTION_FUNCTION() { clear(); } +#ifndef _MSVC + result_type operator()(BOOST_FUNCTION_PARMS) const; +#else result_type operator()(BOOST_FUNCTION_PARMS) const { if (this->empty()) @@ -322,6 +325,7 @@ return result; #endif // BOOST_NO_VOID_RETURNS } +#endif // The distinction between when to use BOOST_FUNCTION_FUNCTION and // when to use self_type is obnoxious. MSVC cannot handle self_type as @@ -556,6 +560,32 @@ f1.swap(f2); } +#ifndef _MSVC + template + typename BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS, + Allocator>::result_type + BOOST_FUNCTION_FUNCTION + ::operator()(BOOST_FUNCTION_PARMS) const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + + internal_result_type result = invoker(this->functor + BOOST_FUNCTION_COMMA + BOOST_FUNCTION_ARGS); + +#ifndef BOOST_NO_VOID_RETURNS + return static_cast(result); +#else + return result; +#endif // BOOST_NO_VOID_RETURNS + } +#endif + + // Poison comparisons between boost::function objects of the same type. template