Skip to content

Commit

Permalink
Add a const to a range-based for loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
hageboeck authored and sponce committed Oct 16, 2023
1 parent 508712f commit 7fe5ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion talk/basicconcepts/control.tex
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
\end{alertblock}
\begin{exampleblock}{\cpp20}
\begin{cppcode*}{firstnumber=6}
for (std::size_t i = 0; auto& d : data) {
for (std::size_t i = 0; auto const & d : data) {
std::cout << i++ << ' ' << d << '\n';
}
\end{cppcode*}
Expand Down

0 comments on commit 7fe5ef9

Please sign in to comment.