diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 1573978..26ab5e1 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -32,7 +32,7 @@ #ifndef BOOST_NO_STD_ALLOCATOR # define BOOST_FUNCTION_DEFAULT_ALLOCATOR std::allocator #else -# define BOOST_FUNCTION_DEFAULT_ALLOCATOR void +# define BOOST_FUNCTION_DEFAULT_ALLOCATOR int #endif // BOOST_NO_STD_ALLOCATOR namespace boost { @@ -660,7 +660,7 @@ namespace boost { } template - To& cast(To* = 0) + To& cast(To* dummy = 0) { assert(typeid(To) != typeid(void)); assert(typeid(To) == this->target_type()); @@ -670,14 +670,14 @@ namespace boost { #ifdef BOOST_FUNCTION_USE_VIRTUAL_FUNCTIONS impl_type* i = reinterpret_cast(impl); - return cast_helper(i->pointer(), tag()); + return cast_helper(i->pointer(), tag(), dummy); #else - return cast_helper(functor, tag()); + return cast_helper(functor, tag(), dummy); #endif // BOOST_FUNCTION_USE_VIRTUAL_FUNCTIONS } template - const To& cast(To* = 0) const + const To& cast(To* dummy = 0) const { assert(typeid(To) != typeid(void)); assert(typeid(To) == this->target_type()); @@ -687,9 +687,9 @@ namespace boost { #ifdef BOOST_FUNCTION_USE_VIRTUAL_FUNCTIONS impl_type* i = reinterpret_cast(impl); - return cast_helper(i->pointer(), tag()); + return cast_helper(i->pointer(), tag(), dummy); #else - return cast_helper(functor, tag()); + return cast_helper(functor, tag(), dummy); #endif // BOOST_FUNCTION_USE_VIRTUAL_FUNCTIONS } @@ -850,9 +850,9 @@ namespace boost { Mixin, Allocator >& f, - To* = 0) + To* dummy = 0) { - return f.template cast(); + return f.cast(dummy); } template& f, - To* = 0) + To* dummy = 0) { - return f.template cast(); + return f.cast(dummy); } }