^Mitchell-Jones AJ, Amori G, Bogdanowicz W, Kryštufek B, Reijnders PJ, Spitzenberger F, Stubbe M, Thissen JB, Vohralík V, Zima J. The Atlas of European Mammals. T. & A. D. Poyser. 1999. ISBN 978-0-85661-130-8.[页码请求]
^ 2.02.12.2Musser GG, Carleton MD. Superfamily Muroidea. (编) Wilson DE, Reeder DM. Mammal Species of the World: A Taxonomic and Geographic Reference 3rd. Baltimore: Johns Hopkins University Press. 2005: 894–1531. ISBN 978-0-8018-8221-0.
^Prager EM, Orrego C, Sage RD. Genetic variation and phylogeography of central Asian and other house mice, including a major new mitochondrial lineage in Yemen. Genetics. October 1998, 150 (2): 835–61. PMC 1460354. PMID 9755213.
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.
...