Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-22 15:46:10


David Morrison wrote:
> I found that if I created a class in analogy with
> "apply" called, say, "apply_mem_fn" like this:
>
> template<class R> struct apply_mem_fn
> {
> typedef R result_type;
>
> template<class F, class A1, class A2, class A3> result_type
> operator()(F & f, A1 & a1, A2 & a2, A3 & a3) const
> {
> return ((a1).*(f))(a2, a3);

Change this to boost::mem_fn( f )( a1, a2, a3 ) and you'll be there.

> }
>
> };


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net