
"Powell, Gary" <powellg@amazon.com> wrote in message news:16D81990DBE42642A8CA977A55FF116A0BD397@ex-mail-sea-02.ant.amazon.com...
// PROPOSED CHANGE IN SOME FUTURE PAPER
unsigned long n = std::accumulate( xs.begin(), xs.end(), 0UL, long (long lhs, X const &rhs) // inline fn with no name. { return lhs + rhs.count; } );
Yeah, but do you propose to make local names visible inside the anonymous function, or not? If you do, you open a big can of worms for implementations (recursive nested functions, need I say more?), if you don't, BLL can still do things that anonymous functions can not. Anonymous functors could help some, but their syntax won't be quite as compact as your example above. ...Max...