diff --git a/include/boost/function.hpp b/include/boost/function.hpp index da7bc28..608ef99 100644 --- a/include/boost/function.hpp +++ b/include/boost/function.hpp @@ -786,21 +786,21 @@ namespace boost { } template - void set(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, - int deprecated = 0) + void set(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) { + int deprecated; self_type(f).swap(*this); } - void set(const base_type& f, - int deprecated = 0) + void set(const base_type& f) { + int deprecated; self_type(f).swap(*this); } - void set(const self_type& f, - int deprecated = 0) + void set(const self_type& f) { + int deprecated; self_type(f).swap(*this); } }; diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 3a64705..e7b2e6e 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -322,9 +322,9 @@ namespace boost { } template - void set(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, - int deprecated = 0) + void set(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) { + int deprecated; self_type(f, static_cast(*this)).swap(*this); }