Index: bind.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/bind.hpp,v retrieving revision 1.33 diff -b -d -u -r1.33 bind.hpp --- bind.hpp 9 Mar 2004 12:49:00 -0000 1.33 +++ bind.hpp 20 Apr 2004 16:39:21 -0000 @@ -113,10 +113,58 @@ // unwrap +#if defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, <= 0x3003) +template +struct unwrapped_pointer +{ + typedef T& type; +}; + +template +struct unwrapped_pointer +{ + typedef _mfi::dm type; +}; + +// CWPro8 can't parse this specialization +// +// template +// struct unwrapped_pointer +// { +// typedef _mfi::dm type; +// }; +// +// So instead we forward through the following mechanisms + +template +struct unwrapped_pointer_to_const +{ + typedef T const& type; +}; + +template +struct unwrapped_pointer_to_const +{ + typedef _mfi::dm type; +}; + +template +struct unwrapped_pointer + : unwrapped_pointer_to_const +{ +}; + +template inline typename unwrapped_pointer::type unwrap(F * f, long) +{ + typedef typename unwrapped_pointer::type r; + return r(*f); +} +#else template inline F & unwrap(F * f, long) { return *f; } +#endif template inline F & unwrap(reference_wrapper * f, int) { @@ -128,6 +176,7 @@ return f->get(); } +#if !defined(__MWERKS__) || !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) template inline _mfi::dm unwrap(R T::* * pm, int) { return _mfi::dm(*pm); @@ -137,6 +186,7 @@ { return _mfi::dm(*pm); } +#endif // listN