Renamed BOOST_MSVC_ONLY to BOOST_FUNCTION_TARGET_FIX

Metrowerks needs the BOOST_FUNCTION_TARGET_FIX workaround


[SVN r12144]
This commit is contained in:
Douglas Gregor
2001-12-24 17:10:47 +00:00
parent fb26630e37
commit d3daf6db42
3 changed files with 12 additions and 11 deletions

View File

@ -456,12 +456,12 @@ namespace boost {
function() : base_type() {}
template<typename Functor>
function(Functor BOOST_MSVC_ONLY(const &) f) : base_type(f) {}
function(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) : base_type(f) {}
function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
template<typename Functor>
self_type& operator=(Functor BOOST_MSVC_ONLY(const &) f)
self_type& operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
{
self_type(f).swap(*this);
return *this;
@ -476,11 +476,11 @@ namespace boost {
self_type& operator=(const self_type& f)
{
self_type(f).swap(*this);
return *this;
}
return *this;
}
template<typename Functor>
void set(Functor BOOST_MSVC_ONLY(const &) f)
void set(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
{
self_type(f).swap(*this);
}

View File

@ -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 {

View File

@ -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);
}