forked from boostorg/function
Renamed BOOST_MSVC_ONLY to BOOST_FUNCTION_TARGET_FIX
Metrowerks needs the BOOST_FUNCTION_TARGET_FIX workaround [SVN r12144]
This commit is contained in:
@ -25,10 +25,10 @@
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# define BOOST_MSVC_ONLY(x) x
|
||||
#if defined(BOOST_MSVC) || defined(__MWERKS__)
|
||||
# define BOOST_FUNCTION_TARGET_FIX(x) x
|
||||
#else
|
||||
# define BOOST_MSVC_ONLY(x)
|
||||
# define BOOST_FUNCTION_TARGET_FIX(x)
|
||||
#endif // not MSVC
|
||||
|
||||
namespace boost {
|
||||
|
@ -203,7 +203,7 @@ namespace boost {
|
||||
// MSVC chokes if the following two constructors are collapsed into
|
||||
// one with a default parameter.
|
||||
template<typename Functor>
|
||||
BOOST_FUNCTION_FUNCTION(Functor BOOST_MSVC_ONLY(const &) f) :
|
||||
BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) :
|
||||
function_base(), Mixin(), invoker(0)
|
||||
{
|
||||
this->assign_to(f);
|
||||
@ -244,14 +244,15 @@ namespace boost {
|
||||
// handle BOOST_FUNCTION_FUNCTION as the type of the temporary to
|
||||
// construct.
|
||||
template<typename Functor>
|
||||
BOOST_FUNCTION_FUNCTION& operator=(Functor f)
|
||||
BOOST_FUNCTION_FUNCTION&
|
||||
operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
|
||||
{
|
||||
self_type(f, static_cast<const Mixin&>(*this)).swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename Functor>
|
||||
void set(Functor f)
|
||||
void set(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
|
||||
{
|
||||
self_type(f, static_cast<const Mixin&>(*this)).swap(*this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user