diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index e8f318e..773cf5f 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 3d4c72c..47f2fa2 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -296,7 +296,10 @@ namespace boost { #ifndef BOOST_FUNCTION_NO_ENABLE_IF BOOST_FUNCTION_FUNCTION(clear_type*) : function_base(), invoker(0) {} #else - BOOST_FUNCTION_FUNCTION(int) : function_base(), invoker(0) {} + BOOST_FUNCTION_FUNCTION(int zero) : function_base(), invoker(0) + { + BOOST_ASSERT(zero == 0); + } #endif BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : @@ -351,8 +354,9 @@ namespace boost { return *this; } #else - BOOST_FUNCTION_FUNCTION& operator=(int) + BOOST_FUNCTION_FUNCTION& operator=(int zero) { + BOOST_ASSERT(zero == 0); this->clear(); return *this; }