728x90
partition_point
-
[c++] std::partition_pointProgramming/c++ 2022. 12. 26. 14:04
1.함수 헤더 파일 #include 2.함수 원형 template ForwardIterator partition_point( ForwardIterator first, ForwardIterator last, UnaryPredicate pred); 조건을 충족하지 않는 지정된 범위의 첫 번째 요소를 반환합니다. 조건을 충족하는 요소가 그렇지 않은 요소 앞에 오도록 요소가 정렬됩니다. 3.return 값(반환 값) 반복자를 반환합니다. 테스트한 조건을 충족하지 않는 첫 번째 요소의 반복자, 반환하는 pred에서 last 반복자까지 찾을 수 없는 경우 4.예제 std::vector vec2 {2, 4, 6, 8, 10, 1, 3, 5, 7, 9}; auto point = std::partition_point(v..