練習用のコードはこれです。
#include <iostream>
#include <boost/bind.hpp>
class Foo
{
 public:
  template <typename T> void Foreach( T& f)
  {
   for(int i= 0 ; i<10; ++i)
   {
    f(data[i]) ;
   }
  } ;
 private:
  int data[10] ;
} ;
void bar( int& data )
{
 data = 1234 ;
}
void hoge( int x, int& data )
{
 std::cout << data * x << std::endl ;
}
int main()
{
 Foo foo ;
 foo.Foreach( bar ) ;
 foo.Foreach( boost::bind( &hoge, 10, _1 ) ) ;
 return 0 ;
}