$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Matthias Kaeppler (nospam_at_[hidden])
Date: 2005-03-10 04:42:12
David Abrahams wrote:
> template< class Fun >
> struct indirect_fun
> {
>     indirect_fun( Fun f ) : fun(f)
>     { }
> 
>     template< class T >
>     typename 
>        result_of<Fun(typename pointee<T>::type)>::type 
>     operator()( T const& r ) const
>     { return fun( *r ); }
> 
>     template< class T, class U >
>     typename result_of<
>         Fun(
>             typename pointee<T>::type,
>             typename pointee<U>::type,
>         )>::type 
>     operator( T const& r, U const& r2 ) const
>     { return fun( *r, *r2 ); }
> 
>     // etc
> private:
>     Fun fun;
> };
> 
Now, what exactly is better about this template over the one I posted? 
Sorry for my ignorance, but I just don't get the point. For example, it 
looks like this template doesn't handle the reference-to-reference problem.
And what is pointee<T>? Is this a boost template?
Regards,
Matthias Kaeppler