Re: [sigc] How to use sigc::bind<>



Jeff Franks wrote:

template <class T_bound1, class T_functor>
template <class T_bound1, class T_functor>
inline bind_functor<0, typename unwrap_reference<T_bound1>::type, T_functor>
bind(const T_functor& _A_func, T_bound1 _A_b1)
{
return bind_functor<0, typename unwrap_reference<T_bound1>::type, T_functor>
          (_A_func, _A_b1);
}

template <class T_bound1, class T_bound2, class T_functor>
inline bind_functor<0, typename unwrap_reference<T_bound1>::type,
bind_functor<0, typename unwrap_reference<T_bound2>::type, T_functor> >
bind(const T_functor& _A_functor, T_bound1 _A_b1, T_bound2 _A_b2)
{
 return bind_functor<0, typename unwrap_reference<T_bound1>::type,
bind_functor<0, typename unwrap_reference<T_bound2>::type, T_functor> >
          (bind<0>(_A_functor, _A_b2), _A_b1);
}

template <class T_bound1, class T_bound2, class T_bound3, class T_functor>
inline bind_functor<0, typename unwrap_reference<T_bound1>::type,
      bind_functor<0, typename unwrap_reference<T_bound2>::type,
bind_functor<0, typename unwrap_reference<T_bound3>::type, T_functor> > > bind(const T_functor& _A_functor, T_bound1 _A_b1, T_bound2 _A_b2,T_bound3 _A_b3)
{
 return bind_functor<0, typename unwrap_reference<T_bound1>::type,
        bind_functor<0, typename unwrap_reference<T_bound2>::type,
bind_functor<0, typename unwrap_reference<T_bound3>::type, T_functor> > >
          (bind<0>(_A_functor, _A_b2, _A_b3),_A_b1);
}

Regards,

I forgot to add, that it is the three sigc::bind calls that work, without the magic number, as Murray mentioned.

Jeff.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]