Skip to content

Commit ef1a6d6

Browse files
committed
Fix typos in is_permutation
1 parent eaa8148 commit ef1a6d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/include/__algorithm/is_permutation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation_impl(
120120
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _BinaryPredicate>
121121
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation(
122122
_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _BinaryPredicate&& __pred) {
123-
// Shorten sequences as much as possible by lopping of any equal prefix.
123+
// Shorten sequences as much as possible by lopping off any equal prefix.
124124
auto __result = std::mismatch(__first1, __last1, __first2, std::ref(__pred));
125125
__first1 = __result.first;
126126
__first2 = __result.second;
@@ -163,7 +163,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __is_permutation(
163163
_Proj1&& __proj1,
164164
_Proj2&& __proj2,
165165
/*_ConstTimeDistance=*/false_type) {
166-
// Shorten sequences as much as possible by lopping of any equal prefix.
166+
// Shorten sequences as much as possible by lopping off any equal prefix.
167167
while (__first1 != __last1 && __first2 != __last2) {
168168
if (!std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
169169
break;

0 commit comments

Comments
 (0)