^So You Won't Talk, Huh?. 時代雜誌. 1946年11月18日 [2009年1月27日](英语). In her cell, Susan learned that it also (technically) forbids hitchhiking, and demands (by a law passed in 1799) that strangers be able to give a good account of themselves. ... Attorney James A. Major of the American Civil Liberties Union demanded that she be given a new trial.
来源
书籍
Nwanna, Dr. Gladson I. (2004). Americans Traveling Abroad: What You Should Know Before You Go, Frontier Publishers, Inc., ISBN 1890605107.
10
1
I have a function that searches a vector of iterators and returns the iterator if its names matches a string passed as an argument. koalaGraph::PVertex lookUpByName(std::string Name, std::vector<koalaGraph::PVertex>& Vertices) { for (size_t i = 0; i < Vertices.size(); i++) { if(Vertices[i]->info.name == Name) return Vertices[i]; } } My question is how can I implement this as a lambda, to use it in connection with std::find_if ? I'm trying this: std::vector<koalaGraph::PVertex> V; std::string Name; std::find_if(V.begin(), V.end(), [&Name]() {return Name == V->info.name;}) But it says that V an enclosing-function local variable cannot be referenced in a lambda body unless it is in the capture list.
...