Skip to content

Commit

Permalink
make_const_sentinel : 表現とサンプルコードの修正
Browse files Browse the repository at this point in the history
  • Loading branch information
onihusube committed Aug 21, 2023
1 parent cd41744 commit 7fc8707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reference/iterator/make_const_sentinel.md
Expand Up @@ -15,7 +15,7 @@ namespace std {
## 概要
`basic_const_iterator`のヘルパ関数。特に、イテレータではないような番兵を`basic_const_iterator`の番兵型へと変換するのに使用する
`basic_const_iterator`のヘルパ関数。特に、イテレータではないような番兵を`basic_const_iterator`の番兵へと変換するのに使用する
## 戻り値
Expand All @@ -35,7 +35,7 @@ return s;
int main() {
std::vector vec = {1, 2, 3, 4, 11, 5, 6, 22};

auto cit = std::make_const_iterator(rng.begin());
auto cit = std::make_const_iterator(vec.begin());
auto cse = std::make_const_sentinel(std::unreachable_sentinel); // unreachable_sentinelはイテレータではない汎用の番兵

auto pos = std::ranges::find_if(cit, cse, [](auto& n) {
Expand Down

0 comments on commit 7fc8707

Please sign in to comment.