Original Post
How could I make this work? void foo( const char * ){} void foo( int ){} int main( int argc, char *argv[] ) { vector ints; for_each( ints.begin(), ints.end(), &foo ); return 0; } It seems to me the compiler really has all the info it needs to figure out which version of foo it should call? Is there a trick I could do to make this work?