![]() |
От: | Аноним | |
Дата: | 15.04.10 14:40 | ||
Оценка: |
int f1( int i )
{
return i;
}
void exec( boost::function<int (int)> f, int i )
{
std::cout << f( i ) << "\n";
}
int main()
{
std::vector<boost::function<int (int)> > s;
s.push_back( f1 );
// ......
// ......
// s.push_back( f10 );
int param = 7;
std::for_each( s.begin(), s.end(), boost::bind( exec, _1, param ) );
return 0;
}