Hi,
Suppose I have the following code:
template< typename T >
void DoFoo( int number, T object )
{
}
void main()
{
std::list<std::string> myStrings;
// Assume myStrings is full of something...
std::for_each( myStrings.begin(), myStrings.end(), boost::bind( &DoFoo, 5, _1 ) );
}
On MSVC 9, this will not compile because DoFoo is a template, and at some point, boost::bind can't take a template as the function to call, or it can't deduce the function's template arguments. Is there a way I can make this work? Thanks.