Shouldn't this be possible with C++11?
With the current clang compilers (Xcode 5 on OS X 10.8) it fails to compile:
std::max_element(group->GetComponents().begin(), group->GetComponents().end(),
[](auto a, auto b) { return a.length > b.length; });
The error message is: Stuff.cp:68:40: 'auto' not allowed in function prototype