[STL] std::ranges::any_of
C++/STL2024. 6. 23. 22:40[STL] std::ranges::any_of

1. 개요std::ranges::any_of 함수는 C++20부터 표준 라이브러리에 추가된 함수로, 주어진 범위(range)에서 하나 이상의 요소가 주어진 조건을 만족하는지 검사한다.2. templatetemplatebool any_of_example(const Range& range, UnaryPredicate predicate) { return std::ranges::any_of(range, predicate);}2.1. 멤버함수std::ranges::any_of(range, predicate): 주어진 범위에서 하나 이상의 요소가 unary_predicate 조건을 만족하는지 검사한다.range: 검사할 요소들의 범위를 나타내는 반복자들이다.predicate: 각 요소를 평가할 조건을 나타내는..

728x90
반응형
image