forked from boostorg/function
function_template.hpp:
- When enable_if is not supported, supply an int version of the constructor and assignment operator so that the '= 0' or construct-with-0 syntax is usable [SVN r16613]
This commit is contained in:
@ -295,7 +295,9 @@ namespace boost {
|
||||
|
||||
#ifndef BOOST_FUNCTION_NO_ENABLE_IF
|
||||
BOOST_FUNCTION_FUNCTION(clear_type*) : function_base(), invoker(0) {}
|
||||
#endif // BOOST_FUNCTION_NO_ENABLE_IF
|
||||
#else
|
||||
BOOST_FUNCTION_FUNCTION(int) : function_base(), invoker(0) {}
|
||||
#endif
|
||||
|
||||
BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) :
|
||||
function_base(),
|
||||
@ -348,7 +350,13 @@ namespace boost {
|
||||
this->clear();
|
||||
return *this;
|
||||
}
|
||||
#endif // BOOST_FUNCTION_NO_ENABLE_IF
|
||||
#else
|
||||
BOOST_FUNCTION_FUNCTION& operator=(int)
|
||||
{
|
||||
this->clear();
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Assignment from another BOOST_FUNCTION_FUNCTION
|
||||
BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f)
|
||||
|
Reference in New Issue
Block a user