두 개의 컨테이너가 있습니다. 하나는 벡터 유형이고 다른 하나는 unordered_set입니다.하나의 컨테이너에서 요소를 바인딩하여 다른 컨테이너에서 func을 호출하는 방법
벡터의 요소 중 하나가 unordered_set에 존재하는지 여부를 확인하고 싶습니다. find_first_of은 true이고 그에 따라 true/false를 반환합니다. 내가 unordered_set의 발견을 이용하고 싶어하기 때문에
지금, 나는의 생각은 any_of (vector_container.begin(), vector_container.end(), 술어) 대신 find_first_of를 사용를 사용합니다.
내가 사용할 수있는 방법은 boost :: bind 벡터에서 요소를 바인드하여 unordered_set에서 찾을 수 있으므로 술어 클래스를 쓸 필요가 없습니까? find()
으로 이렇게
가 왜 Boost.Bind를 사용하려면이 아닌 [람다 식] 않습니다는 (http://en.cppreference.com/w/cpp/language/lambda)? – Mankarse
나는 C++을 사용할 수 없기 때문에 0x – soumeng78
을 사용 했으므로 이제는 ([ any_of는 C++ 98에서 사용할 수 없습니다. 다른 유사한 알고리즘이 있습니까? – soumeng78