//
// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
// Copyright (c) 2001 David Abrahams
+// Copyright (c) 2003-2005 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
#undef BOOST_MEM_FN_CC
#undef BOOST_MEM_FN_NAME
+#ifdef BOOST_MEM_FN_ENABLE_CDECL
+
+#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl
+#define BOOST_MEM_FN_CC __cdecl
+
+#include <boost/bind/mem_fn_template.hpp>
+
+#undef BOOST_MEM_FN_CC
+#undef BOOST_MEM_FN_NAME
+
+#endif
+
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall
#undef BOOST_MEM_FN_CC
#undef BOOST_MEM_FN_NAME
+#ifdef BOOST_MEM_FN_ENABLE_CDECL
+
+#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl
+#define BOOST_MEM_FN_CC __cdecl
+
+#include <boost/bind/mem_fn_template.hpp>
+
+#undef BOOST_MEM_FN_CC
+#undef BOOST_MEM_FN_NAME
+
+#endif
+
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall
#undef BOOST_MEM_FN_NAME2
#undef BOOST_MEM_FN_CC
+#ifdef BOOST_MEM_FN_ENABLE_CDECL
+
+#define BOOST_MEM_FN_NAME(X) X##_cdecl
+#define BOOST_MEM_FN_NAME2(X) inner_##X##_cdecl
+#define BOOST_MEM_FN_CC __cdecl
+
+#include <boost/bind/mem_fn_vw.hpp>
+
+#undef BOOST_MEM_FN_NAME
+#undef BOOST_MEM_FN_NAME2
+#undef BOOST_MEM_FN_CC
+
+#endif
+
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
#define BOOST_MEM_FN_NAME(X) X##_stdcall
#undef BOOST_MEM_FN_CC
#undef BOOST_MEM_FN_NAME
+#ifdef BOOST_MEM_FN_ENABLE_CDECL
+
+#define BOOST_MEM_FN_NAME(X) X##_cdecl
+#define BOOST_MEM_FN_CC __cdecl
+
+#include <boost/bind/mem_fn_template.hpp>
+
+#undef BOOST_MEM_FN_CC
+#undef BOOST_MEM_FN_NAME
+
+#endif
+
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
#define BOOST_MEM_FN_NAME(X) X##_stdcall
#undef BOOST_MEM_FN_NAME
#undef BOOST_MEM_FN_CC
+#ifdef BOOST_MEM_FN_ENABLE_CDECL
+
+#define BOOST_MEM_FN_NAME(X) X##_cdecl
+#define BOOST_MEM_FN_CC __cdecl
+
+#include <boost/bind/mem_fn_cc.hpp>
+
+#undef BOOST_MEM_FN_NAME
+#undef BOOST_MEM_FN_CC
+
+#endif
+
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
#define BOOST_MEM_FN_NAME(X) X##_stdcall
return (u.*f_);
}
- template<class U> R & call(U & u, T *) const
- {
- return (u.*f_);
- }
-
template<class U> R const & call(U & u, void const *) const
{
return (get_pointer(u)->*f_);
return (p->*f_);
}
- template<class U> R const & operator()(U & u) const
+ template<class U> R const & operator()(U const & u) const
{
return call(u, &u);
}
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, < 0x3200)
R & operator()(T & t) const
{
return (t.*f_);
}
-#endif
-
R const & operator()(T const & t) const
{
return (t.*f_);
}
+#endif
+
bool operator==(dm const & rhs) const
{
return f_ == rhs.f_;