Skip to content

Commit

Permalink
Merge pull request cpprefjp#1268 from cpprefjp/Nagarei/fix-typo-at-al…
Browse files Browse the repository at this point in the history
…gorithm

fix typo in algorithm's sample code
  • Loading branch information
faithandbrave authored Apr 19, 2024
2 parents a897609 + 4bfd491 commit fd29f77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reference/algorithm.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ sort(pv.begin(), pv.end(), [](auto&& a, auto&& b){ return a.name < b.name; });
// デフォルトの述語(ranges::less{})で、nameでソート
ranges::sort(pv, {}, [](auto&& a){ return a.name; });
// std::invokeで呼び出されるため、メンバ変数ポインタでもよい
ranges::sort(pv, {}, &Parson::name);
ranges::sort(pv, {}, &Person::name);
```
* ranges::sort[link algorithm/ranges_sort.md]
* ranges::less[link /reference/functional/ranges_less.md]
Expand Down

0 comments on commit fd29f77

Please sign in to comment.