Skip to content

Commit

Permalink
as_const_view : サンプルコードの修正
Browse files Browse the repository at this point in the history
  • Loading branch information
onihusube committed Sep 6, 2023
1 parent 953efe6 commit f1b46a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reference/ranges/as_const_view.md
Expand Up @@ -77,11 +77,11 @@ namespace std::ranges {
int main() {
std::vector<int> vec = {1, 2, 3, 4};
for (const int& i : vec | std::views::as_const) {
for (auto& i : vec | std::views::as_const) {
std::cout << i << ' ';
// 変更不可
//*i = 0
//i = 0
}
}
```
Expand Down

0 comments on commit f1b46a1

Please sign in to comment.