Could this be done with C ++ 11?
With current clang compilers (Xcode 5 on OS X 10.8), it does not compile:
std::max_element(group->GetComponents().begin(), group->GetComponents().end(),
[](auto a, auto b) { return a.length > b.length; });
Error message: Stuff.cp: 68: 40: "auto" is not allowed in the function prototype
source
share