
27 Nov
2007
27 Nov
'07
5:35 p.m.
I disagree. It's not easy to recognise return type and arguments in your code. What about this then:
struct local { static int a(char c) { std::cout << c << '\n'; return 1; } static int zz(char c) { std::cout << c << c << '\n'; return 2; } }; local::a('a') local::zz('Z') std::string str = "foo"; std::for_each(str.begin(),str.end(),&local::a);