Update algorithm functions template parameter names

This commit is contained in:
EnderIce2 2024-03-25 15:10:15 +02:00
parent 5e0fb5c942
commit 2274089a1c
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -75,8 +75,8 @@ namespace std
return last; return last;
} }
template <class InputIt, class UnaryPredicate> template <class InputIt, class UnaryPred>
constexpr InputIt find_if(InputIt first, InputIt last, UnaryPredicate p) constexpr InputIt find_if(InputIt first, InputIt last, UnaryPred p)
{ {
for (; first != last; ++first) for (; first != last; ++first)
if (p(*first)) if (p(*first))
@ -85,8 +85,8 @@ namespace std
return last; return last;
} }
template <class InputIt, class UnaryPredicate> template <class InputIt, class UnaryPred>
constexpr InputIt find_if_not(InputIt first, InputIt last, UnaryPredicate q) constexpr InputIt find_if_not(InputIt first, InputIt last, UnaryPred q)
{ {
for (; first != last; ++first) for (; first != last; ++first)
if (!q(*first)) if (!q(*first))
@ -106,8 +106,8 @@ namespace std
return first; return first;
} }
template <class ForwardIt, class UnaryPredicate> template <class ForwardIt, class UnaryPred>
ForwardIt remove_if(ForwardIt first, ForwardIt last, UnaryPredicate p) ForwardIt remove_if(ForwardIt first, ForwardIt last, UnaryPred p)
{ {
first = std::find_if(first, last, p); first = std::find_if(first, last, p);
if (first != last) if (first != last)