Skip to content

Commit 227c3b2

Browse files
authored
[range.adjacent.overview] Use tuple in example, not pair (#5779)
adjacent_view always yields tuples, but the example was written as if it yielded a std::pair.
1 parent f3ddcf7 commit 227c3b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/ranges.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10548,7 +10548,7 @@
1054810548
vector v = {1, 2, 3, 4};
1054910549

1055010550
for (auto i : v | views::adjacent<2>) {
10551-
cout << "(" << i.first << ", " << i.second << ") "; // prints \tcode{(1, 2) (2, 3) (3, 4)}
10551+
cout << "(" << std::get<0>(i) << ", " << std::get<1>(i) << ") "; // prints \tcode{(1, 2) (2, 3) (3, 4)}
1055210552
}
1055310553
\end{codeblock}
1055410554
\end{example}

0 commit comments

Comments
 (0)