From aad9b5f5e0fcfaf5b9f78759dacec489e2ce8271 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 14 Jul 2001 18:51:00 +0000 Subject: [PATCH] function_template.cpp: - Correctly copy mixin when assigning from any function/function object [SVN r10617] --- include/boost/function/function_template.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index b239186..0e8aafe 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -559,7 +559,7 @@ namespace boost { template BOOST_FUNCTION_FUNCTION& operator=(const Functor& f) { - BOOST_FUNCTION_FUNCTION(f).swap(*this); + BOOST_FUNCTION_FUNCTION(f, static_cast(*this)).swap(*this); return *this; } @@ -567,7 +567,7 @@ namespace boost { template BOOST_FUNCTION_FUNCTION& operator=(Functor* f) { - BOOST_FUNCTION_FUNCTION(f).swap(*this); + BOOST_FUNCTION_FUNCTION(f, static_cast(*this)).swap(*this); return *this; } #endif // __BORLANDC__ @@ -575,14 +575,14 @@ namespace boost { template void set(const Functor& f) { - BOOST_FUNCTION_FUNCTION(f).swap(*this); + BOOST_FUNCTION_FUNCTION(f, static_cast(*this)).swap(*this); } #ifdef __BORLANDC__ template void set(Functor* f) { - BOOST_FUNCTION_FUNCTION(f).swap(*this); + BOOST_FUNCTION_FUNCTION(f, static_cast(*this)).swap(*this); } #endif // __BORLANDC__